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 EnsureSeedIdentityResourcesData(IIdentityResourceProvider identityResourceProvider) { if (identityResourceProvider != null) { Console.WriteLine("IdentityResources being populated"); foreach (var resource in Resources.GetIdentityResources().ToList()) { if (identityResourceProvider.FindIdentityResourcesByName(resource.Name) == null) { identityResourceProvider.Add(resource); } } } else { Console.WriteLine("IdentityResources already populated"); } }
public IdentityServerConfigService(IClientProvider clientProvider, IIdentityResourceProvider identityResourceProvider, IApiResourceProvider apiResourceProvider) { this.clientProvider = clientProvider; this.identityResourceProvider = identityResourceProvider; this.apiResourceProvider = apiResourceProvider; }