Show / Hide Table of Contents

Class MultitenantUserManager<TUser>

Provides the APIs for managing user in a persistence store.

Inheritance
Object
UserManager<TUser>
ExtendedUserManager<TUser>
MultitenantUserManager<TUser>
Inherited Members
ExtendedUserManager<TUser>.Options
ExtendedUserManager<TUser>.Store
ExtendedUserManager<TUser>.Context
ExtendedUserManager<TUser>.RemoveLoginAsync(TUser, String, String)
ExtendedUserManager<TUser>.GetAllSystemUsersAsync()
ExtendedUserManager<TUser>.GetUsernameKindAsync(TUser)
ExtendedUserManager<TUser>.GenerateInvitationTokenAsync(TUser)
ExtendedUserManager<TUser>.VerifyInvitationTokenAsyc(TUser, String)
ExtendedUserManager<TUser>.GenerateOneTimePasswordAsync(TUser)
ExtendedUserManager<TUser>.VerifyOneTimePasswordAsyc(TUser, String, OneTimePasswordSendService)
ExtendedUserManager<TUser>.SetEmailConfirmedAsync(TUser, Boolean)
ExtendedUserManager<TUser>.AssociateSignInAsync(TUser, String, String)
ExtendedUserManager<TUser>.AssociateSignInAsync(TUser, UserLoginInfo, String)
ExtendedUserManager<TUser>.CreateAsync(TUser)
ExtendedUserManager<TUser>.CreateAsync(TUser, Boolean, String)
ExtendedUserManager<TUser>.DeleteAsync(Guid)
ExtendedUserManager<TUser>.DeleteAsync(TUser)
ExtendedUserManager<TUser>.ChangePasswordAsync(TUser, String, String)
ExtendedUserManager<TUser>.ResetPasswordAsync(TUser, String, String)
ExtendedUserManager<TUser>.RemovePasswordAsync(TUser)
ExtendedUserManager<TUser>.RemoveAuthenticatorKey(TUser)
ExtendedUserManager<TUser>.SetLockoutEndDateAsync(TUser, Nullable<DateTimeOffset>)
ExtendedUserManager<TUser>.ExecuteClaimFiltersAsync(TUser, ClaimFilterContext<TUser>)
ExtendedUserManager<TUser>.ExecuteClaimFiltersAsync(ClaimFilterContext<TUser>)
ExtendedUserManager<TUser>.UpdateUserClaims(TUser, ClaimFilterContext<TUser>)
ExtendedUserManager<TUser>.SynchronizeExternalRoleAsync(TUser, ICollection<String>, IEnumerable<IRole>)
ExtendedUserManager<TUser>.AddClaimsAsync(TUser, IEnumerable<Claim>)
ExtendedUserManager<TUser>.AddPermissionAsync(TUser, String)
ExtendedUserManager<TUser>.RemovePermissionAsync(TUser, String)
ExtendedUserManager<TUser>.RemoveClaimsAsync(TUser, IEnumerable<Claim>)
ExtendedUserManager<TUser>.AddRequiredInformationAsync(TUser, String, String)
ExtendedUserManager<TUser>.AccessFailedAsync(TUser)
ExtendedUserManager<TUser>.UpdateUserAsync(TUser)
ExtendedUserManager<TUser>.PublishEventAsync(TUser, UserInteractionEvent[])
ExtendedUserManager<TUser>.RaiseEvent(TUser, UserInteractionEvent[])
Microsoft.AspNetCore.Identity.UserManager<TUser>.ResetPasswordTokenPurpose
Microsoft.AspNetCore.Identity.UserManager<TUser>.ChangePhoneNumberTokenPurpose
UserManager<TUser>.ConfirmEmailTokenPurpose
Microsoft.AspNetCore.Identity.UserManager<TUser>.Dispose()
Microsoft.AspNetCore.Identity.UserManager<TUser>.GetUserName(System.Security.Claims.ClaimsPrincipal)
Microsoft.AspNetCore.Identity.UserManager<TUser>.GetUserId(System.Security.Claims.ClaimsPrincipal)
UserManager<TUser>.GetUserAsync(ClaimsPrincipal)
Microsoft.AspNetCore.Identity.UserManager<TUser>.GenerateConcurrencyStampAsync(TUser)
Microsoft.AspNetCore.Identity.UserManager<TUser>.UpdateAsync(TUser)
Microsoft.AspNetCore.Identity.UserManager<TUser>.FindByIdAsync(System.String)
Microsoft.AspNetCore.Identity.UserManager<TUser>.FindByNameAsync(System.String)
UserManager<TUser>.CreateAsync(TUser, String)
Microsoft.AspNetCore.Identity.UserManager<TUser>.NormalizeKey(System.String)
UserManager<TUser>.UpdateNormalizedUserNameAsync(TUser)
Microsoft.AspNetCore.Identity.UserManager<TUser>.GetUserNameAsync(TUser)
UserManager<TUser>.SetUserNameAsync(TUser, String)
UserManager<TUser>.GetUserIdAsync(TUser)
Microsoft.AspNetCore.Identity.UserManager<TUser>.CheckPasswordAsync(TUser, System.String)
Microsoft.AspNetCore.Identity.UserManager<TUser>.HasPasswordAsync(TUser)
Microsoft.AspNetCore.Identity.UserManager<TUser>.AddPasswordAsync(TUser, System.String)
Microsoft.AspNetCore.Identity.UserManager<TUser>.VerifyPasswordAsync(Microsoft.AspNetCore.Identity.IUserPasswordStore<TUser>, TUser, System.String)
UserManager<TUser>.GetSecurityStampAsync(TUser)
Microsoft.AspNetCore.Identity.UserManager<TUser>.UpdateSecurityStampAsync(TUser)
Microsoft.AspNetCore.Identity.UserManager<TUser>.GeneratePasswordResetTokenAsync(TUser)
UserManager<TUser>.FindByLoginAsync(String, String)
Microsoft.AspNetCore.Identity.UserManager<TUser>.GetLoginsAsync(TUser)
Microsoft.AspNetCore.Identity.UserManager<TUser>.AddClaimAsync(TUser, System.Security.Claims.Claim)
Microsoft.AspNetCore.Identity.UserManager<TUser>.ReplaceClaimAsync(TUser, System.Security.Claims.Claim, System.Security.Claims.Claim)
Microsoft.AspNetCore.Identity.UserManager<TUser>.RemoveClaimAsync(TUser, System.Security.Claims.Claim)
Microsoft.AspNetCore.Identity.UserManager<TUser>.GetClaimsAsync(TUser)
Microsoft.AspNetCore.Identity.UserManager<TUser>.AddToRoleAsync(TUser, System.String)
Microsoft.AspNetCore.Identity.UserManager<TUser>.AddToRolesAsync(TUser, System.Collections.Generic.IEnumerable<System.String>)
UserManager<TUser>.RemoveFromRoleAsync(TUser, String)
UserManager<TUser>.RemoveFromRolesAsync(TUser, IEnumerable<String>)
Microsoft.AspNetCore.Identity.UserManager<TUser>.GetRolesAsync(TUser)
Microsoft.AspNetCore.Identity.UserManager<TUser>.IsInRoleAsync(TUser, System.String)
UserManager<TUser>.GetEmailAsync(TUser)
UserManager<TUser>.SetEmailAsync(TUser, String)
UserManager<TUser>.FindByEmailAsync(String)
UserManager<TUser>.UpdateNormalizedEmailAsync(TUser)
Microsoft.AspNetCore.Identity.UserManager<TUser>.GenerateEmailConfirmationTokenAsync(TUser)
Microsoft.AspNetCore.Identity.UserManager<TUser>.ConfirmEmailAsync(TUser, System.String)
Microsoft.AspNetCore.Identity.UserManager<TUser>.IsEmailConfirmedAsync(TUser)
Microsoft.AspNetCore.Identity.UserManager<TUser>.GenerateChangeEmailTokenAsync(TUser, System.String)
Microsoft.AspNetCore.Identity.UserManager<TUser>.ChangeEmailAsync(TUser, System.String, System.String)
Microsoft.AspNetCore.Identity.UserManager<TUser>.GetPhoneNumberAsync(TUser)
Microsoft.AspNetCore.Identity.UserManager<TUser>.SetPhoneNumberAsync(TUser, System.String)
UserManager<TUser>.ChangePhoneNumberAsync(TUser, String, String)
Microsoft.AspNetCore.Identity.UserManager<TUser>.IsPhoneNumberConfirmedAsync(TUser)
UserManager<TUser>.GenerateChangePhoneNumberTokenAsync(TUser, String)
Microsoft.AspNetCore.Identity.UserManager<TUser>.VerifyChangePhoneNumberTokenAsync(TUser, System.String, System.String)
Microsoft.AspNetCore.Identity.UserManager<TUser>.VerifyUserTokenAsync(TUser, System.String, System.String, System.String)
Microsoft.AspNetCore.Identity.UserManager<TUser>.GenerateUserTokenAsync(TUser, System.String, System.String)
Microsoft.AspNetCore.Identity.UserManager<TUser>.RegisterTokenProvider(System.String, Microsoft.AspNetCore.Identity.IUserTwoFactorTokenProvider<TUser>)
Microsoft.AspNetCore.Identity.UserManager<TUser>.GetValidTwoFactorProvidersAsync(TUser)
Microsoft.AspNetCore.Identity.UserManager<TUser>.VerifyTwoFactorTokenAsync(TUser, System.String, System.String)
Microsoft.AspNetCore.Identity.UserManager<TUser>.GenerateTwoFactorTokenAsync(TUser, System.String)
Microsoft.AspNetCore.Identity.UserManager<TUser>.GetTwoFactorEnabledAsync(TUser)
UserManager<TUser>.SetTwoFactorEnabledAsync(TUser, Boolean)
Microsoft.AspNetCore.Identity.UserManager<TUser>.IsLockedOutAsync(TUser)
UserManager<TUser>.SetLockoutEnabledAsync(TUser, Boolean)
Microsoft.AspNetCore.Identity.UserManager<TUser>.GetLockoutEnabledAsync(TUser)
UserManager<TUser>.GetLockoutEndDateAsync(TUser)
Microsoft.AspNetCore.Identity.UserManager<TUser>.ResetAccessFailedCountAsync(TUser)
Microsoft.AspNetCore.Identity.UserManager<TUser>.GetAccessFailedCountAsync(TUser)
Microsoft.AspNetCore.Identity.UserManager<TUser>.GetUsersForClaimAsync(System.Security.Claims.Claim)
Microsoft.AspNetCore.Identity.UserManager<TUser>.GetUsersInRoleAsync(System.String)
UserManager<TUser>.GetAuthenticationTokenAsync(TUser, String, String)
Microsoft.AspNetCore.Identity.UserManager<TUser>.SetAuthenticationTokenAsync(TUser, System.String, System.String, System.String)
Microsoft.AspNetCore.Identity.UserManager<TUser>.RemoveAuthenticationTokenAsync(TUser, System.String, System.String)
UserManager<TUser>.GetAuthenticatorKeyAsync(TUser)
Microsoft.AspNetCore.Identity.UserManager<TUser>.ResetAuthenticatorKeyAsync(TUser)
Microsoft.AspNetCore.Identity.UserManager<TUser>.GenerateNewAuthenticatorKey()
Microsoft.AspNetCore.Identity.UserManager<TUser>.GenerateNewTwoFactorRecoveryCodesAsync(TUser, System.Int32)
Microsoft.AspNetCore.Identity.UserManager<TUser>.CreateTwoFactorRecoveryCode()
Microsoft.AspNetCore.Identity.UserManager<TUser>.RedeemTwoFactorRecoveryCodeAsync(TUser, System.String)
Microsoft.AspNetCore.Identity.UserManager<TUser>.CountRecoveryCodesAsync(TUser)
UserManager<TUser>.Dispose(Boolean)
Microsoft.AspNetCore.Identity.UserManager<TUser>.CreateSecurityTokenAsync(TUser)
UserManager<TUser>.UpdatePasswordHash(TUser, String, Boolean)
Microsoft.AspNetCore.Identity.UserManager<TUser>.GetChangeEmailTokenPurpose(System.String)
UserManager<TUser>.ValidateUserAsync(TUser)
Microsoft.AspNetCore.Identity.UserManager<TUser>.ValidatePasswordAsync(TUser, System.String)
Microsoft.AspNetCore.Identity.UserManager<TUser>.ThrowIfDisposed()
Microsoft.AspNetCore.Identity.UserManager<TUser>.CancellationToken
UserManager<TUser>.Logger
Microsoft.AspNetCore.Identity.UserManager<TUser>.PasswordHasher
Microsoft.AspNetCore.Identity.UserManager<TUser>.UserValidators
Microsoft.AspNetCore.Identity.UserManager<TUser>.PasswordValidators
Microsoft.AspNetCore.Identity.UserManager<TUser>.KeyNormalizer
Microsoft.AspNetCore.Identity.UserManager<TUser>.ErrorDescriber
Microsoft.AspNetCore.Identity.UserManager<TUser>.SupportsUserAuthenticationTokens
UserManager<TUser>.SupportsUserAuthenticatorKey
Microsoft.AspNetCore.Identity.UserManager<TUser>.SupportsUserTwoFactorRecoveryCodes
UserManager<TUser>.SupportsUserTwoFactor
Microsoft.AspNetCore.Identity.UserManager<TUser>.SupportsUserPassword
UserManager<TUser>.SupportsUserSecurityStamp
Microsoft.AspNetCore.Identity.UserManager<TUser>.SupportsUserRole
Microsoft.AspNetCore.Identity.UserManager<TUser>.SupportsUserLogin
Microsoft.AspNetCore.Identity.UserManager<TUser>.SupportsUserEmail
Microsoft.AspNetCore.Identity.UserManager<TUser>.SupportsUserPhoneNumber
Microsoft.AspNetCore.Identity.UserManager<TUser>.SupportsUserClaim
UserManager<TUser>.SupportsUserLockout
Microsoft.AspNetCore.Identity.UserManager<TUser>.SupportsQueryableUsers
Microsoft.AspNetCore.Identity.UserManager<TUser>.Users
Object.Equals(Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: IRM.AspNetCore.Identity
Assembly: IRM.AspNetCore.Identity.dll
Syntax
public class MultitenantUserManager<TUser> : ExtendedUserManager<TUser>, IDisposable where TUser : class, IMultitenantUser
Type Parameters
TUser

The type encapsulating a user.

Constructors

MultitenantUserManager(IMultitenantUserStore<TUser>, TenantSettingsManager, IOptions<ExtendedIdentityOptions>, IPasswordHasher<TUser>, IEnumerable<IUserValidator<TUser>>, IEnumerable<IPasswordValidator<TUser>>, ILookupNormalizer, ExtendedIdentityErrorDescriber, IServiceProvider, ILogger<MultitenantUserManager<TUser>>)

Constructs a new instance of MultitenantUserManager<TUser>.

Declaration
public MultitenantUserManager(IMultitenantUserStore<TUser> store, TenantSettingsManager authenticationSettingsManager, IOptions<ExtendedIdentityOptions> optionsAccessor, IPasswordHasher<TUser> passwordHasher, IEnumerable<IUserValidator<TUser>> userValidators, IEnumerable<IPasswordValidator<TUser>> passwordValidators, ILookupNormalizer keyNormalizer, ExtendedIdentityErrorDescriber errorDescriber, IServiceProvider services, ILogger<MultitenantUserManager<TUser>> logger)
Parameters
IMultitenantUserStore<TUser> store

The persistence store the manager will operate over.

TenantSettingsManager authenticationSettingsManager

An instance of TenantSettingsManager used to retrieve tenant authentication settings from.

Microsoft.Extensions.Options.IOptions<ExtendedIdentityOptions> optionsAccessor

The accessor used to access the ExtendedIdentityOptions.

Microsoft.AspNetCore.Identity.IPasswordHasher<TUser> passwordHasher

The password hashing implementation to use when saving passwords.

IEnumerable<IUserValidator<TUser>> userValidators

A collection of IUserValidator<TUser> to validate users against.

IEnumerable<Microsoft.AspNetCore.Identity.IPasswordValidator<TUser>> passwordValidators

A collection of Microsoft.AspNetCore.Identity.IPasswordValidator<TUser> to validate passwords against.

Microsoft.AspNetCore.Identity.ILookupNormalizer keyNormalizer

The Microsoft.AspNetCore.Identity.ILookupNormalizer to use when generating index keys for users.

ExtendedIdentityErrorDescriber errorDescriber

The ExtendedIdentityErrorDescriber used to provider error messages.

System.IServiceProvider services

The System.IServiceProvider used to resolve services.

Microsoft.Extensions.Logging.ILogger<MultitenantUserManager<TUser>> logger

The logger used to log messages, warnings and errors.

Properties

MultitenantStore

Gets or sets the persistence store the manager operates over.

Declaration
protected IMultitenantUserStore<TUser> MultitenantStore { get; set; }
Property Value
IMultitenantUserStore<TUser>

The persistence store the manager operates over.

TenantSettingsManager

Gets the TenantSettingsManager used for managing tenant settings in a persistant store.

Declaration
public TenantSettingsManager TenantSettingsManager { get; }
Property Value
TenantSettingsManager

Methods

AddLoginAsync(TUser, UserLoginInfo)

Adds an external Microsoft.AspNetCore.Identity.UserLoginInfo to the specified user.

Declaration
public override Task<IdentityResult> AddLoginAsync(TUser user, UserLoginInfo login)
Parameters
TUser user

The user to add the login to.

Microsoft.AspNetCore.Identity.UserLoginInfo login

The external Microsoft.AspNetCore.Identity.UserLoginInfo to add to the specified user.

Returns
System.Threading.Tasks.Task<IdentityResult>

The System.Threading.Tasks.Task that represents the asynchronous operation, containing the IdentityResult of the operation.

Overrides
IRM.AspNetCore.Identity.ExtendedUserManager<TUser>.AddLoginAsync(TUser, Microsoft.AspNetCore.Identity.UserLoginInfo)

FindUsersByEmailAsync(String)

Finds and returns a list of user, if any, who has the specified email address, without filtering on a tenant.

Declaration
public override Task<List<TUser>> FindUsersByEmailAsync(string email)
Parameters
String email

The email address to search for.

Returns
System.Threading.Tasks.Task<List<TUser>>

The System.Threading.Tasks.Task that represents the asynchronous operation, containing the user matching the specified email if it exists.

Overrides
IRM.AspNetCore.Identity.ExtendedUserManager<TUser>.FindUsersByEmailAsync(System.String)

FindUsersByLoginAsync(String, String)

Finds and returns a list of users associated with the specified external login provider and login provider key, without filtering on a tenant.

Declaration
public override Task<List<TUser>> FindUsersByLoginAsync(string loginProvider, string providerKey)
Parameters
String loginProvider

The login provider who provided the providerKey.

String providerKey

The key provided by the loginProvider to identify a user.

Returns
System.Threading.Tasks.Task<List<TUser>>

The System.Threading.Tasks.Task for the asynchronous operation, containing the user, if any which matched the specified login provider and key.

Overrides
IRM.AspNetCore.Identity.ExtendedUserManager<TUser>.FindUsersByLoginAsync(System.String, System.String)

FindUsersByNameAsync(String)

Finds and returns a list of user, if any, who has the specified user name, without filtering on a tenant.

Declaration
public override Task<List<TUser>> FindUsersByNameAsync(string userName)
Parameters
String userName

The user name to search for.

Returns
System.Threading.Tasks.Task<List<TUser>>

The System.Threading.Tasks.Task that represents the asynchronous operation, containing the user matching the specified userName if it exists.

Overrides
IRM.AspNetCore.Identity.ExtendedUserManager<TUser>.FindUsersByNameAsync(System.String)

SynchronizeRolseAsync(TUser, IEnumerable<String>, IEnumerable<String>)

Adds and removes roles from the user.

Declaration
protected override async Task<ExternalRoleSynchronizationResult> SynchronizeRolseAsync(TUser user, IEnumerable<string> rolesToAdd, IEnumerable<string> rolesToRemove)
Parameters
TUser user

The user to synchronize roles for.

IEnumerable<String> rolesToAdd

Roles to add to the user.

IEnumerable<String> rolesToRemove

Roles to remove from the user.

Returns
System.Threading.Tasks.Task<ExternalRoleSynchronizationResult>

The System.Threading.Tasks.Task that represents the asynchronous operation, containing the IdentityResult of the operation.

Overrides
IRM.AspNetCore.Identity.ExtendedUserManager<TUser>.SynchronizeRolseAsync(TUser, System.Collections.Generic.IEnumerable<System.String>, System.Collections.Generic.IEnumerable<System.String>)
Back to top Generated by DocFX