IUserEmailStore<TUser> Interface¶
Provides an abstraction for the storage and management of user email addresses.
- Namespace
Microsoft.AspNetCore.Identity
- Assemblies
- Microsoft.AspNetCore.Identity
Syntax¶
public interface IUserEmailStore<TUser> : IUserStore<TUser>, IDisposable where TUser : class
-
interface
Microsoft.AspNetCore.Identity.
IUserEmailStore<TUser>
¶
Methods¶
-
FindByEmailAsync
(System.String, System.Threading.CancellationToken)¶ Gets the user, if any, associated with the specified, normalized email address.
Arguments: - normalizedEmail (System.String) – The normalized email address to return the user for.
- cancellationToken (System.Threading.CancellationToken) – The
System.Threading.CancellationToken
used to propagate notifications that the operation should be canceled.
Return type: System.Threading.Tasks.Task<TUser>
Returns: The task object containing the results of the asynchronous lookup operation, the user if any associated with the specified normalized email address.
Task<TUser> FindByEmailAsync(string normalizedEmail, CancellationToken cancellationToken)
-
GetEmailAsync
(TUser, System.Threading.CancellationToken)¶ Gets the email address for the specified <em>user</em>.
Arguments: - user (TUser) – The user whose email should be returned.
- cancellationToken (System.Threading.CancellationToken) – The
System.Threading.CancellationToken
used to propagate notifications that the operation should be canceled.
Return type: System.Threading.Tasks.Task<System.String>
Returns: The task object containing the results of the asynchronous operation, the email address for the specified <em>user</em>.
Task<string> GetEmailAsync(TUser user, CancellationToken cancellationToken)
-
GetEmailConfirmedAsync
(TUser, System.Threading.CancellationToken)¶ Gets a flag indicating whether the email address for the specified <em>user</em> has been verified, true if the email address is verified otherwise false.
Arguments: - user (TUser) – The user whose email confirmation status should be returned.
- cancellationToken (System.Threading.CancellationToken) – The
System.Threading.CancellationToken
used to propagate notifications that the operation should be canceled.
Return type: System.Threading.Tasks.Task<System.Boolean>
Returns: The task object containing the results of the asynchronous operation, a flag indicating whether the email address for the specified <em>user</em> has been confirmed or not.
Task<bool> GetEmailConfirmedAsync(TUser user, CancellationToken cancellationToken)
-
GetNormalizedEmailAsync
(TUser, System.Threading.CancellationToken)¶ Returns the normalized email for the specified <em>user</em>.
Arguments: - user (TUser) – The user whose email address to retrieve.
- cancellationToken (System.Threading.CancellationToken) – The
System.Threading.CancellationToken
used to propagate notifications that the operation should be canceled.
Return type: System.Threading.Tasks.Task<System.String>
Returns: The task object containing the results of the asynchronous lookup operation, the normalized email address if any associated with the specified user.
Task<string> GetNormalizedEmailAsync(TUser user, CancellationToken cancellationToken)
-
SetEmailAsync
(TUser, System.String, System.Threading.CancellationToken)¶ Sets the <em>email</em> address for a <em>user</em>.
Arguments: - user (TUser) – The user whose email should be set.
- email (System.String) – The email to set.
- cancellationToken (System.Threading.CancellationToken) – The
System.Threading.CancellationToken
used to propagate notifications that the operation should be canceled.
Return type: System.Threading.Tasks.Task
Returns: The task object representing the asynchronous operation.
Task SetEmailAsync(TUser user, string email, CancellationToken cancellationToken)
-
SetEmailConfirmedAsync
(TUser, System.Boolean, System.Threading.CancellationToken)¶ Sets the flag indicating whether the specified <em>user</em>’s email address has been confirmed or not.
Arguments: - user (TUser) – The user whose email confirmation status should be set.
- confirmed (System.Boolean) – A flag indicating if the email address has been confirmed, true if the address is confirmed otherwise false.
- cancellationToken (System.Threading.CancellationToken) – The
System.Threading.CancellationToken
used to propagate notifications that the operation should be canceled.
Return type: System.Threading.Tasks.Task
Returns: The task object representing the asynchronous operation.
Task SetEmailConfirmedAsync(TUser user, bool confirmed, CancellationToken cancellationToken)
-
SetNormalizedEmailAsync
(TUser, System.String, System.Threading.CancellationToken)¶ Sets the normalized email for the specified <em>user</em>.
Arguments: - user (TUser) – The user whose email address to set.
- normalizedEmail (System.String) – The normalized email to set for the specified <em>user</em>.
- cancellationToken (System.Threading.CancellationToken) – The
System.Threading.CancellationToken
used to propagate notifications that the operation should be canceled.
Return type: System.Threading.Tasks.Task
Returns: The task object representing the asynchronous operation.
Task SetNormalizedEmailAsync(TUser user, string normalizedEmail, CancellationToken cancellationToken)
-