1
0
mirror of https://github.com/XFox111/SimpleOTP.git synced 2026-07-02 19:52:42 +03:00

3 Commits

Author SHA1 Message Date
xfox111 14f45e1da5 10.0.3 package version update 2026-05-14 08:27:53 +00:00
xfox111 9327264f18 Fixed incorrect OTP config validation 2026-05-14 08:26:11 +00:00
xfox111 3cbb8003a7 Updated devcontainers config 2026-05-14 08:21:55 +00:00
4 changed files with 6 additions and 7 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
{
"name": "SimpleOTP",
// 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": {},
@@ -9,7 +9,7 @@
<PropertyGroup>
<PackageId>EugeneFox.SimpleOTP.DependencyInjection</PackageId>
<Version>10.0.2.0</Version>
<Version>10.0.3.0</Version>
<Authors>Eugene Fox</Authors>
<Copyright>Copyright © Eugene Fox 2026</Copyright>
<NeutralLanguage>en-US</NeutralLanguage>
@@ -114,12 +114,12 @@ public partial record class OtpConfig
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.");
}
// 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
if (format.HasFlag(OtpUriFormat.IBM) && config.Digits is not 7 and not 9)
+2 -3
View File
@@ -15,7 +15,7 @@
<PropertyGroup>
<PackageId>EugeneFox.SimpleOTP</PackageId>
<Version>10.0.2.0</Version>
<Version>10.0.3.0</Version>
<Authors>Eugene Fox</Authors>
<Copyright>Copyright © Eugene Fox 2026</Copyright>
<NeutralLanguage>en-US</NeutralLanguage>
@@ -36,8 +36,7 @@
Feature-rich, fast, and customizable library for implementation TOTP/HOTP authenticators and validators.
</Description>
<PackageReleaseNotes>
- Added support for .NET 10
- Marked library as AOT compatible
- Fixed OTP config incorrect validation of TOTP period and code length.
</PackageReleaseNotes>
</PropertyGroup>