Class MultitenantIdentityBuilder
Helper functions for configuring multi-tenant identity services.
Inheritance
Inherited Members
Namespace: IRM.AspNetCore.Identity
Assembly: IRM.AspNetCore.Identity.dll
Syntax
public class MultitenantIdentityBuilder : ExtendedIdentityBuilder
Constructors
MultitenantIdentityBuilder(Type, Type, Type, Type, Type, IServiceCollection)
Creates a new instance of MultitenantIdentityBuilder.
Declaration
public MultitenantIdentityBuilder(Type user, Type role, Type person, Type organisation, Type tenantOidcSetting, IServiceCollection services)
Parameters
System.Type
user
The System.Type to use for the users. |
System.Type
role
The System.Type to use for the roles. |
System.Type
person
The System.Type to use for the persons. |
System.Type
organisation
The System.Type to use for the organisations. |
System.Type
tenantOidcSetting
The System.Type to use for the tenant OpenID Connect setting. |
Microsoft.Extensions.DependencyInjection.IServiceCollection
services
The Microsoft.Extensions.DependencyInjection.IServiceCollection to attach to. |
MultitenantIdentityBuilder(Type, Type, Type, Type, Type, Type, IServiceCollection)
Creates a new instance of MultitenantIdentityBuilder.
Declaration
protected MultitenantIdentityBuilder(Type audit, Type user, Type role, Type person, Type organisation, Type tenantOidcSetting, IServiceCollection services)
Parameters
System.Type
audit
The System.Type to use for the auditing. |
System.Type
user
The System.Type to use for the users. |
System.Type
role
The System.Type to use for the roles. |
System.Type
person
The System.Type to use for the persons. |
System.Type
organisation
The System.Type to use for the organisations. |
System.Type
tenantOidcSetting
The System.Type to use for the tenant OpenID Connect setting. |
Microsoft.Extensions.DependencyInjection.IServiceCollection
services
The Microsoft.Extensions.DependencyInjection.IServiceCollection to attach to. |
Properties
TenantOidcSettingType
Gets the System.Type used for tenant OpenID Connect settings.
Declaration
public Type TenantOidcSettingType { get; }
Property Value
System.Type
The System.Type used for tenant OpenID Connect settings. |
Methods
AddAuditing<TAudit>()
Adds and configures auditing for the specified Auditing type.
Declaration
public MultitenantIdentityBuilder AddAuditing<TAudit>()
Returns
MultitenantIdentityBuilder
An ExtendedIdentityBuilder for creating and configuring the identity system. |
Type Parameters
TAudit
The type representing a Audit in the system. |
AddClaimFilter<TFilter, TUser>()
Adds a IClaimFilter<TUser> that can be used to manipulate the claims for the user signing in.
Declaration
public MultitenantIdentityBuilder AddClaimFilter<TFilter, TUser>()
where TFilter : class, IClaimFilter<TUser> where TUser : class, IUser
Returns
MultitenantIdentityBuilder
The current MultitenantIdentityBuilder instance. |
Type Parameters
TFilter
The type of sign-in claim filter to use. |
TUser
The type of user. |
AddClaimFilter<TFilter, TUser>(Int32)
Adds a IClaimFilter<TUser> that can be used to manipulate the claims for the user signing in.
Declaration
public MultitenantIdentityBuilder AddClaimFilter<TFilter, TUser>(int order)
where TFilter : class, IClaimFilter<TUser> where TUser : class, IUser
Parameters
System.Int32
order
|
Returns
MultitenantIdentityBuilder
The current MultitenantIdentityBuilder instance. |
Type Parameters
TFilter
The type of sign-in claim filter to use. |
TUser
The type of user. |
AddMultitenantRoleStore<T>()
Adds a IMultitenantUserStore<TUser> for the RoleType.
Declaration
public MultitenantIdentityBuilder AddMultitenantRoleStore<T>()
where T : class
Returns
MultitenantIdentityBuilder
The current MultitenantIdentityBuilder instance. |
Type Parameters
T
The role store type. |
Remarks
Don't forget to configure a ITenantAccessor.
AddMultitenantUserStore<T>()
Adds an IMultitenantUserStore<TUser> for the UserType.
Declaration
public MultitenantIdentityBuilder AddMultitenantUserStore<T>()
where T : class
Returns
MultitenantIdentityBuilder
The current MultitenantIdentityBuilder instance. |
Type Parameters
T
The user store type. |
Remarks
Don't forget to configure a ITenantAccessor.
AddPersons<TPerson>()
Adds Person related services for TPerson, including IPersonValidator, PersonManager.
Declaration
public override ExtendedIdentityBuilder AddPersons<TPerson>()
where TPerson : class, IPerson
Returns
ExtendedIdentityBuilder
The current ExtendedIdentityBuilder instance. |
Type Parameters
TPerson
The person type. |
Overrides
AddTenantAuthenticationSettingsStore<T>()
Adds an ITenantConfigurationStore<TTenantOidcSetting> for the UserType.
Declaration
public MultitenantIdentityBuilder AddTenantAuthenticationSettingsStore<T>()
where T : class
Returns
MultitenantIdentityBuilder
The current MultitenantIdentityBuilder instance. |
Type Parameters
T
The concrete tenant configuration store. |
AddTenantConfigurationStore<T>()
Adds an ITenantConfigurationStore<TTenantOidcSetting> for the UserType.
Declaration
public MultitenantIdentityBuilder AddTenantConfigurationStore<T>()
where T : class
Returns
MultitenantIdentityBuilder
The current MultitenantIdentityBuilder instance. |
Type Parameters
T
The concrete tenant configuration store. |
Remarks
Don't forget to configure a ITenantAccessor.