Skip to content

Commit bd9496c

Browse files
committed
refactor: 更改类名称
1 parent 93f75b0 commit bd9496c

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/components/BootstrapBlazor.Authenticator/Services/DefaultTOTPServices.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ namespace BootstrapBlazor.Components;
99

1010
class DefaultTotpServices(IOptionsMonitor<AuthenticatorOptions> optionsMonitor) : ITotpService
1111
{
12+
[NotNull]
1213
public TotpInstanceBase? Instance { get; private set; }
1314

1415
public string GenerateOtpUri(AuthenticatorOptions? options = null)
@@ -23,7 +24,7 @@ public string GenerateOtpUri(AuthenticatorOptions? options = null)
2324
public string Compute(string secretKey, DateTime? timestamp = null)
2425
{
2526
var instance = new Totp(Base32Encoding.ToBytes(secretKey));
26-
Instance = new DefaultTOTPInstance(instance);
27+
Instance = new DefaultTotpInstance(instance);
2728
return timestamp == null ? instance.ComputeTotp() : instance.ComputeTotp(timestamp.Value);
2829
}
2930

@@ -59,7 +60,7 @@ public bool Verify(string code, DateTime? timestamp = null)
5960
}
6061
}
6162

62-
class DefaultTOTPInstance(Totp instance) : TotpInstanceBase
63+
class DefaultTotpInstance(Totp instance) : TotpInstanceBase
6364
{
6465
public override int GetRemainingSeconds(DateTime? timestamp = null)
6566
{

0 commit comments

Comments
 (0)