mirror of
https://github.com/XFox111/SimpleOTP.git
synced 2026-07-02 19:52:42 +03:00
Compare commits
5 Commits
v10.0.2
...
beec314b3e
| Author | SHA1 | Date | |
|---|---|---|---|
| beec314b3e | |||
| bd876fa0d1 | |||
| 14f45e1da5 | |||
| 9327264f18 | |||
| 3cbb8003a7 |
@@ -3,7 +3,7 @@
|
|||||||
{
|
{
|
||||||
"name": "SimpleOTP",
|
"name": "SimpleOTP",
|
||||||
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
|
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
|
||||||
"image": "mcr.microsoft.com/devcontainers/dotnet:1-10.0",
|
"image": "mcr.microsoft.com/devcontainers/dotnet:10.0",
|
||||||
|
|
||||||
// Features to add to the dev container. More info: https://containers.dev/features.
|
// Features to add to the dev container. More info: https://containers.dev/features.
|
||||||
// "features": {},
|
// "features": {},
|
||||||
|
|||||||
@@ -10,8 +10,8 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.5.1" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.6.0" />
|
||||||
<PackageReference Include="NUnit" Version="4.5.1" />
|
<PackageReference Include="NUnit" Version="4.6.1" />
|
||||||
<PackageReference Include="NUnit3TestAdapter" Version="6.2.0" />
|
<PackageReference Include="NUnit3TestAdapter" Version="6.2.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<PackageId>EugeneFox.SimpleOTP.DependencyInjection</PackageId>
|
<PackageId>EugeneFox.SimpleOTP.DependencyInjection</PackageId>
|
||||||
<Version>10.0.2.0</Version>
|
<Version>10.0.4.0</Version>
|
||||||
<Authors>Eugene Fox</Authors>
|
<Authors>Eugene Fox</Authors>
|
||||||
<Copyright>Copyright © Eugene Fox 2026</Copyright>
|
<Copyright>Copyright © Eugene Fox 2026</Copyright>
|
||||||
<NeutralLanguage>en-US</NeutralLanguage>
|
<NeutralLanguage>en-US</NeutralLanguage>
|
||||||
@@ -37,7 +37,7 @@
|
|||||||
service in your application.
|
service in your application.
|
||||||
</Description>
|
</Description>
|
||||||
<PackageReleaseNotes>
|
<PackageReleaseNotes>
|
||||||
Updated `Microsoft.Extensions.Configuration.Binder` and `Microsoft.Extensions.DependencyInjection.Abstractions` to version 10.0.7.
|
Updated `Microsoft.Extensions.Configuration.Binder` and `Microsoft.Extensions.DependencyInjection.Abstractions` to version 10.0.8.
|
||||||
</PackageReleaseNotes>
|
</PackageReleaseNotes>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
@@ -57,8 +57,8 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="10.0.7" />
|
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="10.0.8" />
|
||||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="10.0.7" />
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="10.0.8" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -114,12 +114,12 @@ public partial record class OtpConfig
|
|||||||
|
|
||||||
if (format.HasFlag(OtpUriFormat.Yubico))
|
if (format.HasFlag(OtpUriFormat.Yubico))
|
||||||
{
|
{
|
||||||
if (config.Type == OtpType.Totp && config.Period is not 15 or 30 or 60)
|
if (config is { Type: OtpType.Totp, Period: not (15 or 30 or 60) })
|
||||||
errors.Add($"- '{nameof(config.Period)}' must be 15, 30 or 60.");
|
errors.Add($"- '{nameof(config.Period)}' must be 15, 30 or 60.");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check for digits value
|
// Check for digits value
|
||||||
if (config.Digits is not 6 or 8)
|
if (config.Digits is not (6 or 8))
|
||||||
{
|
{
|
||||||
// Now it's time for IBM and Yubico to be weird
|
// Now it's time for IBM and Yubico to be weird
|
||||||
if (format.HasFlag(OtpUriFormat.IBM) && config.Digits is not 7 and not 9)
|
if (format.HasFlag(OtpUriFormat.IBM) && config.Digits is not 7 and not 9)
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<PackageId>EugeneFox.SimpleOTP</PackageId>
|
<PackageId>EugeneFox.SimpleOTP</PackageId>
|
||||||
<Version>10.0.2.0</Version>
|
<Version>10.0.4.0</Version>
|
||||||
<Authors>Eugene Fox</Authors>
|
<Authors>Eugene Fox</Authors>
|
||||||
<Copyright>Copyright © Eugene Fox 2026</Copyright>
|
<Copyright>Copyright © Eugene Fox 2026</Copyright>
|
||||||
<NeutralLanguage>en-US</NeutralLanguage>
|
<NeutralLanguage>en-US</NeutralLanguage>
|
||||||
@@ -36,8 +36,7 @@
|
|||||||
Feature-rich, fast, and customizable library for implementation TOTP/HOTP authenticators and validators.
|
Feature-rich, fast, and customizable library for implementation TOTP/HOTP authenticators and validators.
|
||||||
</Description>
|
</Description>
|
||||||
<PackageReleaseNotes>
|
<PackageReleaseNotes>
|
||||||
- Added support for .NET 10
|
- Fixed OTP config incorrect validation of TOTP period and code length.
|
||||||
- Marked library as AOT compatible
|
|
||||||
</PackageReleaseNotes>
|
</PackageReleaseNotes>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user