View Source
Class TwoFactorValidationProvider<TUmbracoIdentityUser, TTwoFactorSetupGenerator>
Inheritance
System.Object
Microsoft.AspNetCore.Identity.DataProtectorTokenProvider<TUmbracoIdentityUser>
Assembly: Umbraco.Web.Common.dll
Syntax
public class TwoFactorValidationProvider<TUmbracoIdentityUser, TTwoFactorSetupGenerator> : DataProtectorTokenProvider<TUmbracoIdentityUser>, IUserTwoFactorTokenProvider<TUmbracoIdentityUser> where TUmbracoIdentityUser : UmbracoIdentityUser where TTwoFactorSetupGenerator : ITwoFactorProvider
Type Parameters
Name |
Description |
TUmbracoIdentityUser |
|
TTwoFactorSetupGenerator |
|
Constructors
View Source
TwoFactorValidationProvider(IDataProtectionProvider, IOptions<DataProtectionTokenProviderOptions>, ILogger<TwoFactorValidationProvider<TUmbracoIdentityUser, TTwoFactorSetupGenerator>>, ITwoFactorLoginService, TTwoFactorSetupGenerator)
Declaration
protected TwoFactorValidationProvider(IDataProtectionProvider dataProtectionProvider, IOptions<DataProtectionTokenProviderOptions> options, ILogger<TwoFactorValidationProvider<TUmbracoIdentityUser, TTwoFactorSetupGenerator>> logger, ITwoFactorLoginService twoFactorLoginService, TTwoFactorSetupGenerator generator)
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.DataProtection.IDataProtectionProvider |
dataProtectionProvider |
|
Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Identity.DataProtectionTokenProviderOptions> |
options |
|
Microsoft.Extensions.Logging.ILogger<TwoFactorValidationProvider<TUmbracoIdentityUser, TTwoFactorSetupGenerator>> |
logger |
|
ITwoFactorLoginService |
twoFactorLoginService |
|
TTwoFactorSetupGenerator |
generator |
|
Methods
View Source
CanGenerateTwoFactorTokenAsync(UserManager<TUmbracoIdentityUser>, TUmbracoIdentityUser)
Declaration
public override Task<bool> CanGenerateTwoFactorTokenAsync(UserManager<TUmbracoIdentityUser> manager, TUmbracoIdentityUser user)
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Identity.UserManager<TUmbracoIdentityUser> |
manager |
|
TUmbracoIdentityUser |
user |
|
Returns
Type |
Description |
Task<System.Boolean> |
|
View Source
GetUserKey(TUmbracoIdentityUser)
Declaration
protected Guid GetUserKey(TUmbracoIdentityUser user)
Parameters
Type |
Name |
Description |
TUmbracoIdentityUser |
user |
|
Returns
View Source
ValidateAsync(String, String, UserManager<TUmbracoIdentityUser>, TUmbracoIdentityUser)
Declaration
public override async Task<bool> ValidateAsync(string purpose, string token, UserManager<TUmbracoIdentityUser> manager, TUmbracoIdentityUser user)
Parameters
Type |
Name |
Description |
System.String |
purpose |
|
System.String |
token |
|
Microsoft.AspNetCore.Identity.UserManager<TUmbracoIdentityUser> |
manager |
|
TUmbracoIdentityUser |
user |
|
Returns
Type |
Description |
Task<System.Boolean> |
|