How to use existing IdentityServer4 instanceΒΆ
- You can use one or more
DbContexts
for 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 interfaceIAdminConfigurationDbContext
TPersistedGrantDbContext
- DbContext for the operational data - It requires to implement interfaceIAdminPersistedGrantDbContext
TLogDbContext
- for the logs - DbContext for the operational data - It requires to implement interfaceIAdminLogDbContext