UserStoreBase<TUser,TKey,TUserClaim,TUserLogin,TUserToken> Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents a new instance of a persistence store for the specified user type.
generic <typename TUser, typename TKey, typename TUserClaim, typename TUserLogin, typename TUserToken>
where TUser : IdentityUser<TKey> where TKey : IEquatable<TKey> where TUserClaim : IdentityUserClaim<TKey>gcnew() where TUserLogin : IdentityUserLogin<TKey>gcnew() where TUserToken : IdentityUserToken<TKey>gcnew()public ref class UserStoreBase abstract : IDisposable, Microsoft::AspNetCore::Identity::IQueryableUserStore<TUser>, Microsoft::AspNetCore::Identity::IUserAuthenticationTokenStore<TUser>, Microsoft::AspNetCore::Identity::IUserAuthenticatorKeyStore<TUser>, Microsoft::AspNetCore::Identity::IUserClaimStore<TUser>, Microsoft::AspNetCore::Identity::IUserEmailStore<TUser>, Microsoft::AspNetCore::Identity::IUserLockoutStore<TUser>, Microsoft::AspNetCore::Identity::IUserLoginStore<TUser>, Microsoft::AspNetCore::Identity::IUserPasswordStore<TUser>, Microsoft::AspNetCore::Identity::IUserPhoneNumberStore<TUser>, Microsoft::AspNetCore::Identity::IUserSecurityStampStore<TUser>, Microsoft::AspNetCore::Identity::IUserStore<TUser>, Microsoft::AspNetCore::Identity::IUserTwoFactorRecoveryCodeStore<TUser>, Microsoft::AspNetCore::Identity::IUserTwoFactorStore<TUser>
public abstract class UserStoreBase<TUser,TKey,TUserClaim,TUserLogin,TUserToken> : IDisposable, Microsoft.AspNetCore.Identity.IQueryableUserStore<TUser>, Microsoft.AspNetCore.Identity.IUserAuthenticationTokenStore<TUser>, Microsoft.AspNetCore.Identity.IUserAuthenticatorKeyStore<TUser>, Microsoft.AspNetCore.Identity.IUserClaimStore<TUser>, Microsoft.AspNetCore.Identity.IUserEmailStore<TUser>, Microsoft.AspNetCore.Identity.IUserLockoutStore<TUser>, Microsoft.AspNetCore.Identity.IUserLoginStore<TUser>, Microsoft.AspNetCore.Identity.IUserPasswordStore<TUser>, Microsoft.AspNetCore.Identity.IUserPhoneNumberStore<TUser>, Microsoft.AspNetCore.Identity.IUserSecurityStampStore<TUser>, Microsoft.AspNetCore.Identity.IUserStore<TUser>, Microsoft.AspNetCore.Identity.IUserTwoFactorRecoveryCodeStore<TUser>, Microsoft.AspNetCore.Identity.IUserTwoFactorStore<TUser> where TUser : IdentityUser<TKey> where TKey : IEquatable<TKey> where TUserClaim : IdentityUserClaim<TKey>, new() where TUserLogin : IdentityUserLogin<TKey>, new() where TUserToken : IdentityUserToken<TKey>, new()
type UserStoreBase<'User, 'Key, 'UserClaim, 'UserLogin, 'UserToken (requires 'User :> IdentityUser<'Key> and 'Key :> IEquatable<'Key> and 'UserClaim :> IdentityUserClaim<'Key> and 'UserClaim : (new : unit -> 'UserClaim) and 'UserLogin :> IdentityUserLogin<'Key> and 'UserLogin : (new : unit -> 'UserLogin) and 'UserToken :> IdentityUserToken<'Key> and 'UserToken : (new : unit -> 'UserToken))> = class
interface IUserLoginStore<'User (requires 'User :> IdentityUser<'Key>)>
interface IUserStore<'User (requires 'User :> IdentityUser<'Key>)>
interface IDisposable
interface IUserClaimStore<'User (requires 'User :> IdentityUser<'Key>)>
interface IUserPasswordStore<'User (requires 'User :> IdentityUser<'Key>)>
interface IUserSecurityStampStore<'User (requires 'User :> IdentityUser<'Key>)>
interface IUserEmailStore<'User (requires 'User :> IdentityUser<'Key>)>
interface IUserLockoutStore<'User (requires 'User :> IdentityUser<'Key>)>
interface IUserPhoneNumberStore<'User (requires 'User :> IdentityUser<'Key>)>
interface IQueryableUserStore<'User (requires 'User :> IdentityUser<'Key>)>
interface IUserTwoFactorStore<'User (requires 'User :> IdentityUser<'Key>)>
interface IUserAuthenticationTokenStore<'User (requires 'User :> IdentityUser<'Key>)>
interface IUserAuthenticatorKeyStore<'User (requires 'User :> IdentityUser<'Key>)>
interface IUserTwoFactorRecoveryCodeStore<'User (requires 'User :> IdentityUser<'Key>)>
Public MustInherit Class UserStoreBase(Of TUser, TKey, TUserClaim, TUserLogin, TUserToken)
Implements IDisposable, IQueryableUserStore(Of TUser), IUserAuthenticationTokenStore(Of TUser), IUserAuthenticatorKeyStore(Of TUser), IUserClaimStore(Of TUser), IUserEmailStore(Of TUser), IUserLockoutStore(Of TUser), IUserLoginStore(Of TUser), IUserPasswordStore(Of TUser), IUserPhoneNumberStore(Of TUser), IUserSecurityStampStore(Of TUser), IUserStore(Of TUser), IUserTwoFactorRecoveryCodeStore(Of TUser), IUserTwoFactorStore(Of TUser)
Type Parameters
- TUser
The type representing a user.
- TKey
The type of the primary key for a user.
- TUserClaim
The type representing a claim.
- TUserLogin
The type representing a user external login.
- TUserToken
The type representing a user token.
- Inheritance
-
UserStoreBase<TUser,TKey,TUserClaim,TUserLogin,TUserToken>
- Derived
- Implements
-
IQueryableUserStore<TUser> IUserAuthenticationTokenStore<TUser> IUserAuthenticatorKeyStore<TUser> IUserClaimStore<TUser> IUserEmailStore<TUser> IUserLockoutStore<TUser> IUserLoginStore<TUser> IUserPasswordStore<TUser> IUserPhoneNumberStore<TUser> IUserSecurityStampStore<TUser> IUserStore<TUser> IUserTwoFactorRecoveryCodeStore<TUser> IUserTwoFactorStore<TUser> IDisposable
Constructors
UserStoreBase<TUser,TKey,TUserClaim,TUserLogin,TUserToken>(IdentityErrorDescriber) |
Creates a new instance. |
Properties
ErrorDescriber |
Gets or sets the IdentityErrorDescriber for any error that occurred with the current operation. |
Users |
A navigation property for the users the store contains. |
Methods
AddClaimsAsync(TUser, IEnumerable<Claim>, CancellationToken) |
Adds the |
AddLoginAsync(TUser, UserLoginInfo, CancellationToken) |
Adds the |
AddUserTokenAsync(TUserToken) |
Add a new user token. |
ConvertIdFromString(String) |
Converts the provided |
ConvertIdToString(TKey) |
Converts the provided |
CountCodesAsync(TUser, CancellationToken) |
Returns how many recovery code are still valid for a user. |
CreateAsync(TUser, CancellationToken) |
Creates the specified |
CreateUserClaim(TUser, Claim) |
Called to create a new instance of a IdentityUserClaim<TKey>. |
CreateUserLogin(TUser, UserLoginInfo) |
Called to create a new instance of a IdentityUserLogin<TKey>. |
CreateUserToken(TUser, String, String, String) |
Called to create a new instance of a IdentityUserToken<TKey>. |
DeleteAsync(TUser, CancellationToken) |
Deletes the specified |
Dispose() |
Dispose the store |
FindByEmailAsync(String, CancellationToken) |
Gets the user, if any, associated with the specified, normalized email address. |
FindByIdAsync(String, CancellationToken) |
Finds and returns a user, if any, who has the specified |
FindByLoginAsync(String, String, CancellationToken) |
Retrieves the user associated with the specified login provider and login provider key.. |
FindByNameAsync(String, CancellationToken) |
Finds and returns a user, if any, who has the specified normalized user name. |
FindTokenAsync(TUser, String, String, CancellationToken) |
Find a user token if it exists. |
FindUserAsync(TKey, CancellationToken) |
Return a user with the matching userId if it exists. |
FindUserLoginAsync(String, String, CancellationToken) |
Return a user login with provider, providerKey if it exists. |
FindUserLoginAsync(TKey, String, String, CancellationToken) |
Return a user login with the matching userId, provider, providerKey if it exists. |
GetAccessFailedCountAsync(TUser, CancellationToken) |
Retrieves the current failed access count for the specified |
GetAuthenticatorKeyAsync(TUser, CancellationToken) |
Get the authenticator key for the specified |
GetClaimsAsync(TUser, CancellationToken) |
Get the claims associated with the specified |
GetEmailAsync(TUser, CancellationToken) |
Gets the email address for the specified |
GetEmailConfirmedAsync(TUser, CancellationToken) |
Gets a flag indicating whether the email address for the specified |
GetLockoutEnabledAsync(TUser, CancellationToken) |
Retrieves a flag indicating whether user lockout can enabled for the specified user. |
GetLockoutEndDateAsync(TUser, CancellationToken) |
Gets the last DateTimeOffset a user's last lockout expired, if any. Any time in the past should be indicates a user is not locked out. |
GetLoginsAsync(TUser, CancellationToken) |
Retrieves the associated logins for the specified |
GetNormalizedEmailAsync(TUser, CancellationToken) |
Returns the normalized email for the specified |
GetNormalizedUserNameAsync(TUser, CancellationToken) |
Gets the normalized user name for the specified |
GetPasswordHashAsync(TUser, CancellationToken) |
Gets the password hash for a user. |
GetPhoneNumberAsync(TUser, CancellationToken) |
Gets the telephone number, if any, for the specified |
GetPhoneNumberConfirmedAsync(TUser, CancellationToken) |
Gets a flag indicating whether the specified |
GetSecurityStampAsync(TUser, CancellationToken) |
Get the security stamp for the specified |
GetTokenAsync(TUser, String, String, CancellationToken) |
Returns the token value. |
GetTwoFactorEnabledAsync(TUser, CancellationToken) |
Returns a flag indicating whether the specified |
GetUserIdAsync(TUser, CancellationToken) |
Gets the user identifier for the specified |
GetUserNameAsync(TUser, CancellationToken) |
Gets the user name for the specified |
GetUsersForClaimAsync(Claim, CancellationToken) |
Retrieves all users with the specified claim. |
HasPasswordAsync(TUser, CancellationToken) |
Returns a flag indicating if the specified user has a password. |
IncrementAccessFailedCountAsync(TUser, CancellationToken) |
Records that a failed access has occurred, incrementing the failed access count. |
RedeemCodeAsync(TUser, String, CancellationToken) |
Returns whether a recovery code is valid for a user. Note: recovery codes are only valid once, and will be invalid after use. |
RemoveClaimsAsync(TUser, IEnumerable<Claim>, CancellationToken) |
Removes the |
RemoveLoginAsync(TUser, String, String, CancellationToken) |
Removes the |
RemoveTokenAsync(TUser, String, String, CancellationToken) |
Deletes a token for a user. |
RemoveUserTokenAsync(TUserToken) |
Remove a new user token. |
ReplaceClaimAsync(TUser, Claim, Claim, CancellationToken) |
Replaces the |
ReplaceCodesAsync(TUser, IEnumerable<String>, CancellationToken) |
Updates the recovery codes for the user while invalidating any previous recovery codes. |
ResetAccessFailedCountAsync(TUser, CancellationToken) |
Resets a user's failed access count. |
SetAuthenticatorKeyAsync(TUser, String, CancellationToken) |
Sets the authenticator key for the specified |
SetEmailAsync(TUser, String, CancellationToken) |
Sets the |
SetEmailConfirmedAsync(TUser, Boolean, CancellationToken) |
Sets the flag indicating whether the specified |
SetLockoutEnabledAsync(TUser, Boolean, CancellationToken) |
Set the flag indicating if the specified |
SetLockoutEndDateAsync(TUser, Nullable<DateTimeOffset>, CancellationToken) |
Locks out a user until the specified end date has passed. Setting a end date in the past immediately unlocks a user. |
SetNormalizedEmailAsync(TUser, String, CancellationToken) |
Sets the normalized email for the specified |
SetNormalizedUserNameAsync(TUser, String, CancellationToken) |
Sets the given normalized name for the specified |
SetPasswordHashAsync(TUser, String, CancellationToken) |
Sets the password hash for a user. |
SetPhoneNumberAsync(TUser, String, CancellationToken) |
Sets the telephone number for the specified |
SetPhoneNumberConfirmedAsync(TUser, Boolean, CancellationToken) |
Sets a flag indicating if the specified |
SetSecurityStampAsync(TUser, String, CancellationToken) |
Sets the provided security |
SetTokenAsync(TUser, String, String, String, CancellationToken) |
Sets the token value for a particular user. |
SetTwoFactorEnabledAsync(TUser, Boolean, CancellationToken) |
Sets a flag indicating whether the specified |
SetUserNameAsync(TUser, String, CancellationToken) |
Sets the given |
ThrowIfDisposed() |
Throws if this class has been disposed. |
UpdateAsync(TUser, CancellationToken) |
Updates the specified |