Overview
This page assumes you have read the AdminUI as a NuGet package documentation area.
When using the AdminUI NuGet package in your web applications, you can use the default stores, partially extend the default stores, or write your own stores.
This opens up AdminUI to users who may have not been able to take advantage of it in the past. Namely: 1. Users who have Users, Roles or Claim Types that do not adhere to the default Identity schema the ability to write code that allows them to be managed via AdminUI. 2. Users that require the extension of the existing identity stores.
Changes
AdminUI’s identity model has historically been based on the ASP.NET Identity model provided by Microsoft. This means “Identity” is composed primarily of Users, Roles, Claims and their associated Claim Types. This includes using the UserManager and RoleManager provided with ASP.NET Identity
AdminUI 6.3 adds a group of abstractions that allow for the decoupling from this old identity model.
The group of abstractions are:
- ISSOUserStore – Handles CRUD operations relating to users
- ISSOClaimTypeStore - Handles CRUD operations relating to claim types
- ISSORoleStore - Handles CRUD operations relating to roles
These store abstractions are initialized in AdminUI's service layer using ISSOStoreFactory
.
Starting point
To get started, take the result of the NuGet Installation and update the service registration to the following:
builder.Services.AddAdminUI().WithIdentityStore<SSOStoreFactory>();
Currently the WithIdentityStore<>()
method is using the default SSOStoreFactory from the AdminUI NuGet package, which is the default factory used within AdminUI.
Additional Configuration
The AddAdminUI method takes in additional configuration that is used to tell AdminUI if you are using a custom store or if you want to configure the migrations that run on startup.
builder.Services
.AddAdminUI(options =>
{
options.IdentityType = IdentityType.DefaultIdentity;
options.MigrationOptions = MigrationOptions.All;
})
.WithIdentityStore<CustomStoreFactory>();
IdentityType is a pair of enums:
- DefaultIdentity
- Select this if need any of AdminUIs identity services e.g you are not using a custom identity store or are using a partial implementation that uses any of AdminUIs identity services (IIdentityUnitOfWorkFactory etc)
- CustomIdentity
- Select this to disable the default AdminUI identity services - used for full custom identity store implementations
Migration Options lets you chose what, if any, migrations run on startup:
- All
- Runs all migrations on startup
- IdentityOnly
- Runs all but the IdentityServer (Configuration and Operational) migrations
- Migrations: Identity, ExtendedConfiguration, Audit, Saml, WsFed and DataProtection
- IdentityServerOnly
- Runs all but the Identity migrations
- Migrations: Configuration, Operational, ExtendedConfiguration, Audit, Saml, WsFed and DataProtection
- AdminUI
- Runs all but the Identity and IdentityServer migrations
- Migrations: ExtendedConfiguration, Audit, Saml, WsFed and DataProtection
- None
- Disables all migrations
Next Steps
Partial Implementation
Will outline how to wrap the existing stores, how to override certain calls, and how to manage additional fields on your Identity models.
Full Implementation
Will outline how to build your own AdminUI compatible Identity store from scratch.
We also provide a MongoDB example of a full implementation.