mirror of
https://github.com/XFox111/SimpleOTP.git
synced 2026-07-02 19:52:42 +03:00
Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| beec314b3e | |||
| bd876fa0d1 | |||
| 14f45e1da5 | |||
| 9327264f18 | |||
| 3cbb8003a7 | |||
| 4723ce8558 | |||
| b835a892ec | |||
| d7fb086a25 | |||
| 3b1ebe38ce | |||
| 70c31fdfbe | |||
| e43c4d2e80 |
@@ -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": {},
|
||||
|
||||
+12
-3
@@ -15,7 +15,10 @@ updates:
|
||||
schedule:
|
||||
interval: monthly
|
||||
rebase-strategy: disabled
|
||||
open-pull-requests-limit: 20
|
||||
groups:
|
||||
all:
|
||||
patterns:
|
||||
- "*"
|
||||
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
@@ -24,7 +27,10 @@ updates:
|
||||
schedule:
|
||||
interval: monthly
|
||||
rebase-strategy: disabled
|
||||
open-pull-requests-limit: 20
|
||||
groups:
|
||||
all:
|
||||
patterns:
|
||||
- "*"
|
||||
|
||||
- package-ecosystem: "devcontainers"
|
||||
directory: "/"
|
||||
@@ -33,4 +39,7 @@ updates:
|
||||
schedule:
|
||||
interval: monthly
|
||||
rebase-strategy: disabled
|
||||
open-pull-requests-limit: 20
|
||||
groups:
|
||||
all:
|
||||
patterns:
|
||||
- "*"
|
||||
|
||||
@@ -49,7 +49,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v5
|
||||
|
||||
@@ -28,7 +28,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v5
|
||||
|
||||
@@ -10,7 +10,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v5
|
||||
|
||||
@@ -52,7 +52,7 @@ If you are interested in fixing issues and contributing directly to the code bas
|
||||
[](https://github.com/xfox111)
|
||||
[](https://buymeacoffee.com/xfox111)
|
||||
|
||||
> ©2025 Eugene Fox. Licensed under [MIT license][mit]
|
||||
> ©2026 Eugene Fox. Licensed under [MIT license][mit]
|
||||
|
||||
[RFC-6238]: https://www.rfc-editor.org/rfc/rfc6238
|
||||
[RFC-4226]: https://www.rfc-editor.org/rfc/rfc4226
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.0" />
|
||||
<PackageReference Include="NUnit" Version="4.4.0" />
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="5.2.0" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.6.0" />
|
||||
<PackageReference Include="NUnit" Version="4.6.1" />
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="6.2.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<PackageId>EugeneFox.SimpleOTP.DependencyInjection</PackageId>
|
||||
<Version>10.0.0.0</Version>
|
||||
<Version>10.0.4.0</Version>
|
||||
<Authors>Eugene Fox</Authors>
|
||||
<Copyright>Copyright © Eugene Fox 2024</Copyright>
|
||||
<Copyright>Copyright © Eugene Fox 2026</Copyright>
|
||||
<NeutralLanguage>en-US</NeutralLanguage>
|
||||
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||
</PropertyGroup>
|
||||
@@ -37,7 +37,7 @@
|
||||
service in your application.
|
||||
</Description>
|
||||
<PackageReleaseNotes>
|
||||
Added support for .NET 10
|
||||
Updated `Microsoft.Extensions.Configuration.Binder` and `Microsoft.Extensions.DependencyInjection.Abstractions` to version 10.0.8.
|
||||
</PackageReleaseNotes>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -57,9 +57,8 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="9.0.*" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions"
|
||||
Version="9.0.*" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="10.0.8" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="10.0.8" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -15,9 +15,9 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<PackageId>EugeneFox.SimpleOTP</PackageId>
|
||||
<Version>10.0.0.0</Version>
|
||||
<Version>10.0.4.0</Version>
|
||||
<Authors>Eugene Fox</Authors>
|
||||
<Copyright>Copyright © Eugene Fox 2024</Copyright>
|
||||
<Copyright>Copyright © Eugene Fox 2026</Copyright>
|
||||
<NeutralLanguage>en-US</NeutralLanguage>
|
||||
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||
</PropertyGroup>
|
||||
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user