How to use existing IdentityServer4 instanceΒΆ
- You can use one or more
DbContextsfor the administration. - The configuration of DbContexts is in the
Startup.cs:
- Single DbContext:
- ::
- services.AddAdminServices<AdminDbContext>();
AddAdminServices expects one generic param:
TAdminDbContext- It requires to implement interfacesIAdminConfigurationDbContext,IAdminPersistedGrantDbContext,IAdminLogDbContext
- Multiple DbContexts:
- It is possible to overload this method:
- ::
- services.AddAdminServices<TConfigurationDbContext, TPersistedGrantDbContext, TLogDbContext>();
AddAdminServices expects following generic params:
TConfigurationDbContext- DbContext for the configuration data - It requires to implement interfaceIAdminConfigurationDbContextTPersistedGrantDbContext- DbContext for the operational data - It requires to implement interfaceIAdminPersistedGrantDbContextTLogDbContext- for the logs - DbContext for the operational data - It requires to implement interfaceIAdminLogDbContext