Show / Hide Table of Contents

Class ExtendedUserManager<TUser>

Provides the APIs for managing user in a persistence store.

Inheritance
Object
UserManager<TUser>
ExtendedUserManager<TUser>
MultitenantUserManager<TUser>
Inherited Members
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 ExtendedUserManager<TUser> : UserManager<TUser>, IDisposable where TUser : class, IUser
Type Parameters
TUser

The type encapsulating a user.

Constructors

ExtendedUserManager(IUserStore<TUser>, IOptions<ExtendedIdentityOptions>, IPasswordHasher<TUser>, IEnumerable<IUserValidator<TUser>>, IEnumerable<IPasswordValidator<TUser>>, ILookupNormalizer, ExtendedIdentityErrorDescriber, IServiceProvider, ILogger<ExtendedUserManager<TUser>>)

Constructs a new instance of ExtendedUserManager<TUser>.

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

The persistence store the manager will operate over.

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<ExtendedUserManager<TUser>> logger

The logger used to log messages, warnings and errors.

Properties

Context

Gets the Microsoft.AspNetCore.Http.HttpContext.

Declaration
protected HttpContext Context { get; }
Property Value
Microsoft.AspNetCore.Http.HttpContext

Options

The ExtendedIdentityOptions used to configure Identity.

Declaration
public ExtendedIdentityOptions Options { get; set; }
Property Value
ExtendedIdentityOptions

Store

Gets the persistence store the manager operates over.

Declaration
protected IUserStore<TUser> Store { get; }
Property Value
IUserStore<TUser>

The persistence store the manager operates over.

Methods

AccessFailedAsync(TUser)

Declaration
public override Task<IdentityResult> AccessFailedAsync(TUser user)
Parameters
TUser user

Returns
System.Threading.Tasks.Task<IdentityResult>

Overrides
Microsoft.AspNetCore.Identity.UserManager<TUser>.AccessFailedAsync(TUser)

AddClaimsAsync(TUser, IEnumerable<Claim>)

Declaration
public override async Task<IdentityResult> AddClaimsAsync(TUser user, IEnumerable<Claim> claims)
Parameters
TUser user

IEnumerable<System.Security.Claims.Claim> claims

Returns
System.Threading.Tasks.Task<IdentityResult>

Overrides
Microsoft.AspNetCore.Identity.UserManager<TUser>.AddClaimsAsync(TUser, System.Collections.Generic.IEnumerable<System.Security.Claims.Claim>)

AddLoginAsync(TUser, UserLoginInfo)

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

Declaration
public override async 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
Microsoft.AspNetCore.Identity.UserManager<TUser>.AddLoginAsync(TUser, Microsoft.AspNetCore.Identity.UserLoginInfo)

AddPermissionAsync(TUser, String)

Adds the specified permission to the user.

Declaration
public virtual async Task<IdentityResult> AddPermissionAsync(TUser user, string permission)
Parameters
TUser user

The user to add the permission to.

String permission

The Permission to add.

Returns
System.Threading.Tasks.Task<IdentityResult>

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

AddRequiredInformationAsync(TUser, String, String)

Adds an e-mail address and/or a phone number to a user.

Declaration
public virtual async Task<IdentityResult> AddRequiredInformationAsync(TUser user, string email, string phoneNumber)
Parameters
TUser user

The TUser to be completed with the required information."/>

String email

The email address to be added to the user.

String phoneNumber

The phone number to be added to the user.

Returns
System.Threading.Tasks.Task<IdentityResult>

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

AssociateSignInAsync(TUser, UserLoginInfo, String)

Associates an invited user with a local user account.

Declaration
public virtual async Task<IdentityResult> AssociateSignInAsync(TUser user, UserLoginInfo login, string token)
Parameters
TUser user

The user to associate.

Microsoft.AspNetCore.Identity.UserLoginInfo login

The external Microsoft.AspNetCore.Identity.UserLoginInfo to associate with the specified user.

String token

The invitation token to validate.

Returns
System.Threading.Tasks.Task<IdentityResult>

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

AssociateSignInAsync(TUser, String, String)

Associates an invited user with a local user account.

Declaration
public virtual async Task<IdentityResult> AssociateSignInAsync(TUser user, string password, string token)
Parameters
TUser user

The user to associate.

String password

The password for the user to hash and store.

String token

The invitation token to validate.

Returns
System.Threading.Tasks.Task<IdentityResult>

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

ChangePasswordAsync(TUser, String, String)

Declaration
public override async Task<IdentityResult> ChangePasswordAsync(TUser user, string currentPassword, string newPassword)
Parameters
TUser user

String currentPassword

String newPassword

Returns
System.Threading.Tasks.Task<IdentityResult>

Overrides
Microsoft.AspNetCore.Identity.UserManager<TUser>.ChangePasswordAsync(TUser, System.String, System.String)

CreateAsync(TUser)

Declaration
public override Task<IdentityResult> CreateAsync(TUser user)
Parameters
TUser user

Returns
System.Threading.Tasks.Task<IdentityResult>

Overrides
Microsoft.AspNetCore.Identity.UserManager<TUser>.CreateAsync(TUser)

CreateAsync(TUser, Boolean, String)

Creates the specified user in the backing store with no password, as an asynchronous operation.

Declaration
public async Task<IdentityResult> CreateAsync(TUser user, bool sendInvitation = false, string additionalInvitationParameters = null)
Parameters
TUser user

The user to create.

Boolean sendInvitation

Indicates if an invitation should be sent to the user.

String additionalInvitationParameters

Additional parameters to add in the link of an invitation.

Returns
System.Threading.Tasks.Task<IdentityResult>

The IdentityResult of the operation.

DeleteAsync(TUser)

Declaration
public override Task<IdentityResult> DeleteAsync(TUser user)
Parameters
TUser user

Returns
System.Threading.Tasks.Task<IdentityResult>

Overrides
Microsoft.AspNetCore.Identity.UserManager<TUser>.DeleteAsync(TUser)

DeleteAsync(Guid)

Deletes the user with the specified userId from the backing store.

Declaration
public virtual async Task<IdentityResult> DeleteAsync(Guid userId)
Parameters
System.Guid userId

The id of the user to delete.

Returns
System.Threading.Tasks.Task<IdentityResult>

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

ExecuteClaimFiltersAsync(TUser, ClaimFilterContext<TUser>)

Executes all s.

Declaration
public virtual async Task ExecuteClaimFiltersAsync(TUser user, ClaimFilterContext<TUser> context)
Parameters
TUser user

The user to update.

ClaimFilterContext<TUser> context

The ClaimFilterContext<TUser>.

Returns
System.Threading.Tasks.Task

The System.Threading.Tasks.Task that represents the asynchronous operation, containing the ClaimFilterContext<TUser>.

ExecuteClaimFiltersAsync(ClaimFilterContext<TUser>)

Executes all s.

Declaration
public virtual async Task ExecuteClaimFiltersAsync(ClaimFilterContext<TUser> context)
Parameters
ClaimFilterContext<TUser> context

The ClaimFilterContext<TUser>.

Returns
System.Threading.Tasks.Task

The System.Threading.Tasks.Task that represents the asynchronous operation, containing the ClaimFilterContext<TUser>.

FindUsersByEmailAsync(String)

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

Declaration
public virtual async 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.

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 virtual async 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.

FindUsersByNameAsync(String)

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

Declaration
public virtual async 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.

GenerateInvitationTokenAsync(TUser)

Generates an email invitation token for the specified user.

Declaration
public virtual async Task<string> GenerateInvitationTokenAsync(TUser user)
Parameters
TUser user

The user to generate an email invitation token for.

Returns
System.Threading.Tasks.Task<String>

The System.Threading.Tasks.Task that represents the asynchronous operation, an email invitation token.

GenerateOneTimePasswordAsync(TUser)

Generates a phone token for the specified user.

Declaration
public virtual async Task<string> GenerateOneTimePasswordAsync(TUser user)
Parameters
TUser user

The user to generate a phone token for.

Returns
System.Threading.Tasks.Task<String>

The System.Threading.Tasks.Task that represents the asynchronous operation, a phone token.

GetAllSystemUsersAsync()

Gets all users that represents systems.

Declaration
public virtual Task<List<TUser>> GetAllSystemUsersAsync()
Returns
System.Threading.Tasks.Task<List<TUser>>

A System.Threading.Tasks.Task that represents the List<T> of the asynchronous query.

GetUsernameKindAsync(TUser)

Gets the UsernameKind for the specified user.

Declaration
public virtual async Task<UsernameKind> GetUsernameKindAsync(TUser user)
Parameters
TUser user

The user to get the UsernameKind for.

Returns
System.Threading.Tasks.Task<UsernameKind>

The System.Threading.Tasks.Task for the asynchronous operation, containing the UsernameKind.

PublishEventAsync(TUser, UserInteractionEvent[])

Publishes an events for the specified user.

Declaration
public virtual async Task<IdentityResult> PublishEventAsync(TUser user, params UserInteractionEvent[] events)
Parameters
TUser user

The user to publish an event for.

UserInteractionEvent[] events

Collection of one or more UserInteractionEvent to publish.

Returns
System.Threading.Tasks.Task<IdentityResult>

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

RaiseEvent(TUser, UserInteractionEvent[])

Adds an UserInteractionEvent to the user with common properties set.

Declaration
protected virtual void RaiseEvent(TUser user, params UserInteractionEvent[] events)
Parameters
TUser user

The user to add the event to.

UserInteractionEvent[] events

Collection of one or more UserInteractionEvent to add.

RemoveAuthenticatorKey(TUser)

Removes the shared key used with an authenticator app.

Declaration
public virtual async Task<IdentityResult> RemoveAuthenticatorKey(TUser user)
Parameters
TUser user

The user to remove the key for.

Returns
System.Threading.Tasks.Task<IdentityResult>

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

RemoveClaimsAsync(TUser, IEnumerable<Claim>)

Declaration
public override async Task<IdentityResult> RemoveClaimsAsync(TUser user, IEnumerable<Claim> claims)
Parameters
TUser user

IEnumerable<System.Security.Claims.Claim> claims

Returns
System.Threading.Tasks.Task<IdentityResult>

Overrides
Microsoft.AspNetCore.Identity.UserManager<TUser>.RemoveClaimsAsync(TUser, System.Collections.Generic.IEnumerable<System.Security.Claims.Claim>)

RemoveLoginAsync(TUser, String, String)

Attempts to remove the provided external login information from the specified user. and returns a flag indicating whether the removal succeed or not.

Declaration
public override Task<IdentityResult> RemoveLoginAsync(TUser user, string loginProvider, string providerKey)
Parameters
TUser user

The user to remove the login information from.

String loginProvider

The login provide whose information should be removed.

String providerKey

The key given by the external login provider for 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
Microsoft.AspNetCore.Identity.UserManager<TUser>.RemoveLoginAsync(TUser, System.String, System.String)

RemovePasswordAsync(TUser)

Declaration
public override Task<IdentityResult> RemovePasswordAsync(TUser user)
Parameters
TUser user

Returns
System.Threading.Tasks.Task<IdentityResult>

Overrides
Microsoft.AspNetCore.Identity.UserManager<TUser>.RemovePasswordAsync(TUser)

RemovePermissionAsync(TUser, String)

Removes the specified permission from the user.

Declaration
public virtual Task<IdentityResult> RemovePermissionAsync(TUser user, string permission)
Parameters
TUser user

The user to remove the permission from.

String permission

The identity of the functionality to remove permission for.

Returns
System.Threading.Tasks.Task<IdentityResult>

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

ResetPasswordAsync(TUser, String, String)

Declaration
public override Task<IdentityResult> ResetPasswordAsync(TUser user, string token, string newPassword)
Parameters
TUser user

String token

String newPassword

Returns
System.Threading.Tasks.Task<IdentityResult>

Overrides
Microsoft.AspNetCore.Identity.UserManager<TUser>.ResetPasswordAsync(TUser, System.String, System.String)

SetEmailConfirmedAsync(TUser, Boolean)

Sets the user email as verified.

Declaration
public virtual async Task<IdentityResult> SetEmailConfirmedAsync(TUser user, bool updateUser = true)
Parameters
TUser user

The user that has verified the email.

Boolean updateUser

true to update in database; otherwise false. Default to true.

Returns
System.Threading.Tasks.Task<IdentityResult>

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

SetLockoutEndDateAsync(TUser, Nullable<DateTimeOffset>)

Declaration
public override Task<IdentityResult> SetLockoutEndDateAsync(TUser user, DateTimeOffset? lockoutEnd)
Parameters
TUser user

System.Nullable<System.DateTimeOffset> lockoutEnd

Returns
System.Threading.Tasks.Task<IdentityResult>

Overrides
Microsoft.AspNetCore.Identity.UserManager<TUser>.SetLockoutEndDateAsync(TUser, System.Nullable<System.DateTimeOffset>)

SynchronizeExternalRoleAsync(TUser, ICollection<String>, IEnumerable<IRole>)

Synhronizes which external roles that the specified user belongs to.

Declaration
public async Task<ExternalRoleSynchronizationResult> SynchronizeExternalRoleAsync(TUser user, ICollection<string> externalUserRoles, IEnumerable<IRole> allRoles)
Parameters
TUser user

The user to synchronize external roles for.

System.Collections.Generic.ICollection<String> externalUserRoles

The collection of roles from an external authentication scheme.

IEnumerable<IRole> allRoles

All (external) roles in the application.

Returns
System.Threading.Tasks.Task<ExternalRoleSynchronizationResult>

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

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

Adds and removes roles from the user.

Declaration
protected virtual 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.

UpdateUserAsync(TUser)

Declaration
protected override Task<IdentityResult> UpdateUserAsync(TUser user)
Parameters
TUser user

Returns
System.Threading.Tasks.Task<IdentityResult>

Overrides
Microsoft.AspNetCore.Identity.UserManager<TUser>.UpdateUserAsync(TUser)

UpdateUserClaims(TUser, ClaimFilterContext<TUser>)

Updates the user's claims after claim filters have executed.

Declaration
public virtual async Task UpdateUserClaims(TUser user, ClaimFilterContext<TUser> context)
Parameters
TUser user

The user to update.

ClaimFilterContext<TUser> context

The ClaimFilterContext<TUser> with claim changes.

Returns
System.Threading.Tasks.Task

The System.Threading.Tasks.Task that represents the asynchronous operation.

VerifyInvitationTokenAsyc(TUser, String)

Returns a flag indicating whether the specified user's email invitation token is valid.

Declaration
public virtual Task<bool> VerifyInvitationTokenAsyc(TUser user, string token)
Parameters
TUser user

The user to validate the token against.

String token

The email invitation token to validate.

Returns
System.Threading.Tasks.Task<Boolean>

The System.Threading.Tasks.Task that represents the asynchronous operation, returning true if the token is valid, otherwise false.

VerifyOneTimePasswordAsyc(TUser, String, OneTimePasswordSendService)

Returns a flag indicating whether the specified user's email confirmation token is valid.

Declaration
public virtual async Task<bool> VerifyOneTimePasswordAsyc(TUser user, string token, OneTimePasswordSendService serviceUsed)
Parameters
TUser user

The user to validate the token against.

String token

The email confirmation token to validate.

OneTimePasswordSendService serviceUsed

The OneTimePasswordSendService used to send the one-time password to the user.

Returns
System.Threading.Tasks.Task<Boolean>

The System.Threading.Tasks.Task that represents the asynchronous operation, returning true if the token is valid, otherwise false.

Back to top Generated by DocFX