IUserAuthenticationTokenStore<TUser> Interface¶
Provides an abstraction to store a user’s authentication tokens.
- Namespace
Microsoft.AspNetCore.Identity
- Assemblies
- Microsoft.AspNetCore.Identity
Syntax¶
public interface IUserAuthenticationTokenStore<TUser> : IUserStore<TUser>, IDisposable where TUser : class
-
interface
Microsoft.AspNetCore.Identity.
IUserAuthenticationTokenStore<TUser>
¶
Methods¶
-
GetTokenAsync
(TUser, System.String, System.String, System.Threading.CancellationToken)¶ Returns the token value.
Arguments: - user (TUser) – The user.
- loginProvider (System.String) – The authentication provider for the token.
- name (System.String) – The name of the token.
- 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
System.Threading.Tasks.Task
that represents the asynchronous operation.Task<string> GetTokenAsync(TUser user, string loginProvider, string name, CancellationToken cancellationToken)
-
RemoveTokenAsync
(TUser, System.String, System.String, System.Threading.CancellationToken)¶ Deletes a token for a user.
Arguments: - user (TUser) – The user.
- loginProvider (System.String) – The authentication provider for the token.
- name (System.String) – The name of the token.
- cancellationToken (System.Threading.CancellationToken) – The
System.Threading.CancellationToken
used to propagate notifications that the operation should be canceled.
Return type: System.Threading.Tasks.Task
Task RemoveTokenAsync(TUser user, string loginProvider, string name, CancellationToken cancellationToken)
-
SetTokenAsync
(TUser, System.String, System.String, System.String, System.Threading.CancellationToken)¶ Sets the token value for a particular user.
Arguments: - user (TUser) – The user.
- loginProvider (System.String) – The authentication provider for the token.
- name (System.String) – The name of the token.
- value (System.String) – The value of the token.
- 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
System.Threading.Tasks.Task
that represents the asynchronous operation.Task SetTokenAsync(TUser user, string loginProvider, string name, string value, CancellationToken cancellationToken)
-