DataProtectorTokenProvider<TUser> Class

Definition

Provides protection and validation of identity tokens.

generic <typename TUser>
 where TUser : classpublic ref class DataProtectorTokenProvider : Microsoft::AspNetCore::Identity::IUserTwoFactorTokenProvider<TUser>
public class DataProtectorTokenProvider<TUser> : Microsoft.AspNetCore.Identity.IUserTwoFactorTokenProvider<TUser> where TUser : class
type DataProtectorTokenProvider<'User (requires 'User : null)> = class
    interface IUserTwoFactorTokenProvider<'User (requires 'User : null)>
Public Class DataProtectorTokenProvider(Of TUser)
Implements IUserTwoFactorTokenProvider(Of TUser)

Type Parameters

TUser

The type used to represent a user.

Inheritance
DataProtectorTokenProvider<TUser>
Implements

Constructors

DataProtectorTokenProvider<TUser>(IDataProtectionProvider, IOptions<DataProtectionTokenProviderOptions>)

Initializes a new instance of the DataProtectorTokenProvider<TUser> class.

DataProtectorTokenProvider<TUser>(IDataProtectionProvider, IOptions<DataProtectionTokenProviderOptions>, ILogger<DataProtectorTokenProvider<TUser>>)

Initializes a new instance of the DataProtectorTokenProvider<TUser> class.

Properties

Logger

Gets the ILogger used to log messages from the provider.

Name

Gets the name of this instance.

Options

Gets the DataProtectionTokenProviderOptions for this instance.

Protector

Gets the IDataProtector for this instance.

Methods

CanGenerateTwoFactorTokenAsync(UserManager<TUser>, TUser)

Returns a Boolean indicating whether a token generated by this instance can be used as a Two Factor Authentication token as an asynchronous operation.

GenerateAsync(String, UserManager<TUser>, TUser)

Generates a protected token for the specified user as an asynchronous operation.

ValidateAsync(String, String, UserManager<TUser>, TUser)

Validates the protected token for the specified user and purpose as an asynchronous operation.

Applies to