Browse Source
address copilot review: drop unused using; make GetTokenName protected
pull/25316/head
maliming
2 weeks ago
No known key found for this signature in database
GPG Key ID: A646B9CB645ECEA4
2 changed files with
1 additions and
5 deletions
-
modules/identity/test/Volo.Abp.Identity.AspNetCore.Tests/Volo/Abp/Identity/AspNetCore/AbpEmailTwoFactorTokenProvider_Tests.cs
-
modules/identity/test/Volo.Abp.Identity.AspNetCore.Tests/Volo/Abp/Identity/AspNetCore/AbpTwoFactorTokenProviderTestBase.cs
|
|
|
@ -233,7 +233,4 @@ public class AbpEmailTwoFactorTokenProvider_Tests : AbpTwoFactorTokenProviderTes |
|
|
|
|
|
|
|
await uow.CompleteAsync(); |
|
|
|
} |
|
|
|
|
|
|
|
private string GetTokenName(string purpose) |
|
|
|
=> AbpEmailTwoFactorTokenProvider.ProviderName + ":" + purpose; |
|
|
|
} |
|
|
|
|
|
|
|
@ -1,5 +1,4 @@ |
|
|
|
using System; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Globalization; |
|
|
|
using System.Threading.Tasks; |
|
|
|
using Microsoft.AspNetCore.Identity; |
|
|
|
@ -47,7 +46,7 @@ public abstract class AbpTwoFactorTokenProviderTestBase : AbpIdentityAspNetCoreT |
|
|
|
protected virtual Task<bool> VerifyTokenAsync(IdentityUser user, string token, string purpose = TwoFactorPurpose) |
|
|
|
=> UserManager.VerifyUserTokenAsync(user, GetTokenProviderName(), purpose, token); |
|
|
|
|
|
|
|
private string GetTokenName(string purpose) => GetInternalProviderName() + ":" + purpose; |
|
|
|
protected string GetTokenName(string purpose) => GetInternalProviderName() + ":" + purpose; |
|
|
|
|
|
|
|
/// <summary>Deterministically produce a code that is guaranteed not to equal <paramref name="code"/>.</summary>
|
|
|
|
private static string DifferentCode(string code) |
|
|
|
|