public ResourceStore(IConfiguration configuration, IApiResourceProvider apiResource, IIdentityResourceProvider identityResource, ILogger <ResourceStore> logger) { this._configuration = configuration; this._apiResource = apiResource ?? throw new ArgumentNullException(nameof(apiResource)); this._identityResource = identityResource ?? throw new ArgumentNullException(nameof(identityResource)); this._logger = logger; }
public ResourceStore(IConfiguration configuration, IApiResourceProvider apiResource, IIdentityResourceProvider identityResource, IApiScopesProvider apiScopesProvider) { _configuration = configuration; _apiResource = apiResource ?? throw new ArgumentNullException(nameof(apiResource)); _identityResource = identityResource ?? throw new ArgumentNullException(nameof(identityResource)); _apiScopesProvider = apiScopesProvider; }
public IdentityServerConfigService(string connectionString, string schema) { var dbSchema = schema.IndexOf("[", StringComparison.InvariantCultureIgnoreCase) >= 0 ? schema : $"[{schema}]"; this.clientProvider = new DefaultClientProvider(new DBProviderOptions() { ConnectionString = connectionString, DbSchema = dbSchema }, null); this.identityResourceProvider = new DefaultIdentityResourceProvider(new DBProviderOptions() { ConnectionString = connectionString, DbSchema = dbSchema }, null); this.apiResourceProvider = new DefaultApiResourceProvider(new DBProviderOptions() { ConnectionString = connectionString, DbSchema = dbSchema }, null); }
private static void EnsureSeedApiResourcesData(IApiResourceProvider apiResourceProvider) { if (apiResourceProvider != null) { Console.WriteLine("ApiResources being populated"); foreach (var resource in Resources.GetApiResources().ToList()) { if (apiResourceProvider.FindApiResource(resource.Name) == null) { apiResourceProvider.Add(resource); } } } else { Console.WriteLine("ApiResources already populated"); } }
public IdentityServerConfigService(IClientProvider clientProvider, IIdentityResourceProvider identityResourceProvider, IApiResourceProvider apiResourceProvider) { this.clientProvider = clientProvider; this.identityResourceProvider = identityResourceProvider; this.apiResourceProvider = apiResourceProvider; }