Skip to content

Latest commit

 

History

History
32 lines (21 loc) · 1.05 KB

Configure-To-Existing-IS4.md

File metadata and controls

32 lines (21 loc) · 1.05 KB

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:

1) Single DbContext:

services.AddAdminServices<AdminDbContext>();

AddAdminServices expects one generic param:

  • TAdminDbContext - It requires to implement interfaces IAdminConfigurationDbContext, IAdminPersistedGrantDbContext, IAdminLogDbContext

2) 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 interface IAdminConfigurationDbContext
  • TPersistedGrantDbContext - DbContext for the operational data
    • It requires to implement interface IAdminPersistedGrantDbContext
  • TLogDbContext - for the logs - DbContext for the operational data
    • It requires to implement interface IAdminLogDbContext