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

31 Commits

Author SHA1 Message Date
xfox111 beec314b3e 10.0.4 package version update 2026-06-03 16:26:09 +12:00
dependabot[bot] bd876fa0d1 Bump the all group with 4 updates (#58)
Bumps Microsoft.Extensions.Configuration.Binder from 10.0.7 to 10.0.8
Bumps Microsoft.Extensions.DependencyInjection.Abstractions from 10.0.7 to 10.0.8
Bumps Microsoft.NET.Test.Sdk from 18.5.1 to 18.6.0
Bumps NUnit from 4.5.1 to 4.6.1

---
updated-dependencies:
- dependency-name: Microsoft.Extensions.Configuration.Binder
  dependency-version: 10.0.8
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: Microsoft.Extensions.DependencyInjection.Abstractions
  dependency-version: 10.0.8
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-version: 18.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: all
- dependency-name: NUnit
  dependency-version: 4.6.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: all
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-03 16:22:40 +12:00
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
xfox111 4723ce8558 Package versions and copyright dates update 2026-05-14 08:33:58 +12:00
dependabot[bot] b835a892ec Bump the all group with 5 updates (#55)
Bumps Microsoft.Extensions.Configuration.Binder from 10.0.1 to 10.0.7
Bumps Microsoft.Extensions.DependencyInjection.Abstractions from 10.0.1 to 10.0.7
Bumps Microsoft.NET.Test.Sdk from 18.0.1 to 18.5.1
Bumps NUnit from 4.4.0 to 4.5.1
Bumps NUnit3TestAdapter from 6.0.1 to 6.2.0

---
updated-dependencies:
- dependency-name: Microsoft.Extensions.Configuration.Binder
  dependency-version: 10.0.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: Microsoft.Extensions.DependencyInjection.Abstractions
  dependency-version: 10.0.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-version: 18.5.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: all
- dependency-name: NUnit
  dependency-version: 4.5.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: all
- dependency-name: NUnit3TestAdapter
  dependency-version: 6.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: all
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-14 08:27:09 +12:00
dependabot[bot] d7fb086a25 Bump the all group with 1 update (#51)
Bumps NUnit3TestAdapter from 6.0.0 to 6.0.1

---
updated-dependencies:
- dependency-name: NUnit3TestAdapter
  dependency-version: 6.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-03 20:30:07 +03:00
dependabot[bot] 3b1ebe38ce Bump actions/checkout from 5 to 6 (#46)
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-11 01:48:24 +03:00
xfox111 70c31fdfbe Updated dependabot to group PRs 2025-12-10 22:47:22 +00:00
xfox111 e43c4d2e80 Dependency version bumps 2025-12-10 22:46:58 +00:00
xfox111 4218903ace .NET 10 support + NativeAOT compatibility for the base package (#41) 2025-11-14 05:30:48 +03:00
dependabot[bot] e257ad6bfd Bump github/codeql-action from 3 to 4 (#38)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3 to 4.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-11 15:09:24 +03:00
dependabot[bot] 9c645e9f03 Bump Microsoft.NET.Test.Sdk from 17.14.1 to 18.0.0 (#39)
---
updated-dependencies:
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-version: 18.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-11 15:09:03 +03:00
dependabot[bot] 14e9a645ff Bump NUnit3TestAdapter from 5.1.0 to 5.2.0 (#40)
---
updated-dependencies:
- dependency-name: NUnit3TestAdapter
  dependency-version: 5.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-11 15:08:46 +03:00
dependabot[bot] 0e361ccd0b Bump actions/setup-dotnet from 4 to 5 (#37)
Bumps [actions/setup-dotnet](https://github.com/actions/setup-dotnet) from 4 to 5.
- [Release notes](https://github.com/actions/setup-dotnet/releases)
- [Commits](https://github.com/actions/setup-dotnet/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-dotnet
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-04 16:56:16 +05:00
dependabot[bot] 269f85adf2 Bump NUnit3TestAdapter from 5.0.0 to 5.1.0 (#36)
---
updated-dependencies:
- dependency-name: NUnit3TestAdapter
  dependency-version: 5.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Eugene Fox <eugene@xfox111.net>
2025-09-02 21:36:01 +03:00
dependabot[bot] 56b662441b Bump NUnit from 4.3.2 to 4.4.0 (#35)
---
updated-dependencies:
- dependency-name: NUnit
  dependency-version: 4.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-02 21:32:52 +03:00
dependabot[bot] 80e18fd20a Bump actions/checkout from 4 to 5 (#34)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-02 21:32:37 +03:00
dependabot[bot] f7f75ebd27 Bump Microsoft.NET.Test.Sdk from 17.13.0 to 17.14.1 (#33)
---
updated-dependencies:
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-version: 17.14.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-01 11:57:01 +03:00
xfox111 f67cbd7b27 Replaced dependabot reviewers with CODEOWNERS 2025-06-03 18:52:44 +03:00
dependabot[bot] 91d021ec50 Bump NUnit3TestAdapter from 4.6.0 to 5.0.0 (#31)
Bumps [NUnit3TestAdapter](https://github.com/nunit/nunit3-vs-adapter) from 4.6.0 to 5.0.0.
- [Release notes](https://github.com/nunit/nunit3-vs-adapter/releases)
- [Commits](https://github.com/nunit/nunit3-vs-adapter/compare/V4.6.0...V5.0.0)

---
updated-dependencies:
- dependency-name: NUnit3TestAdapter
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-02 18:19:50 +03:00
dependabot[bot] 225237f45f Bump Microsoft.NET.Test.Sdk from 17.12.0 to 17.13.0 (#32)
Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 17.12.0 to 17.13.0.
- [Release notes](https://github.com/microsoft/vstest/releases)
- [Changelog](https://github.com/microsoft/vstest/blob/main/docs/releases.md)
- [Commits](https://github.com/microsoft/vstest/compare/v17.12.0...v17.13.0)

---
updated-dependencies:
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-02 18:19:28 +03:00
xfox111 2ff4b5827a Update README.md 2025-01-13 14:57:27 +03:00
xfox111 f7c8e547be Update LICENSE 2025-01-08 21:30:19 +03:00
xfox111 85a07d3163 Update README.md 2025-01-08 21:26:19 +03:00
dependabot[bot] ef09e49aa3 Bump NUnit from 4.2.2 to 4.3.2 (#30)
Bumps [NUnit](https://github.com/nunit/nunit) from 4.2.2 to 4.3.2.
- [Release notes](https://github.com/nunit/nunit/releases)
- [Changelog](https://github.com/nunit/nunit/blob/main/CHANGES.md)
- [Commits](https://github.com/nunit/nunit/compare/4.2.2...4.3.2)

---
updated-dependencies:
- dependency-name: NUnit
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-08 21:24:53 +03:00
xfox111 ce9d126087 Update codeql-analysis.yml (#29) 2024-11-28 16:42:58 +03:00
xfox111 989ed46f3b Major: support for .NET 9 (#26)
* Updated target to net9.0

* Merged net8.0 and net9.0 targets

* Updated workflows
2024-11-28 16:00:26 +03:00
xfox111 ee0ae960d0 Fixed RFC links in README 2024-09-26 02:20:10 +00:00
xfox111 704d115208 Updated README banner to be visible on nuget 2024-09-26 02:17:03 +00:00
14 changed files with 133 additions and 55 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-8.0",
"image": "mcr.microsoft.com/devcontainers/dotnet:10.0",
// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
+1
View File
@@ -0,0 +1 @@
* @XFox111
+15 -12
View File
@@ -11,32 +11,35 @@ updates:
- package-ecosystem: "nuget" # See documentation for possible values
directory: "/" # Location of package manifests
assignees:
- "xfox111"
reviewers:
- "xfox111"
- "XFox111"
schedule:
interval: monthly
rebase-strategy: disabled
open-pull-requests-limit: 20
groups:
all:
patterns:
- "*"
- package-ecosystem: "github-actions"
directory: "/"
assignees:
- "xfox111"
reviewers:
- "xfox111"
- "XFox111"
schedule:
interval: monthly
rebase-strategy: disabled
open-pull-requests-limit: 20
groups:
all:
patterns:
- "*"
- package-ecosystem: "devcontainers"
directory: "/"
assignees:
- "xfox111"
reviewers:
- "xfox111"
- "XFox111"
schedule:
interval: monthly
rebase-strategy: disabled
open-pull-requests-limit: 20
groups:
all:
patterns:
- "*"
+11 -6
View File
@@ -8,7 +8,7 @@ name: "CodeQL"
on:
push:
branches: [ "main" ]
branches: [ "main", "next" ]
paths-ignore:
- '**.md'
- 'LICENSE'
@@ -19,7 +19,7 @@ on:
- '.assets/*'
pull_request:
# The branches below must be a subset of the branches above
branches: [ "main" ]
branches: [ "main", "next" ]
paths-ignore:
- '**.md'
- 'LICENSE'
@@ -49,11 +49,16 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: 9.0.x
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -67,7 +72,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3
uses: github/codeql-action/autobuild@v4
# ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -80,4 +85,4 @@ jobs:
# ./location_of_script_within_repo/buildscript.sh
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
uses: github/codeql-action/analyze@v4
+6 -6
View File
@@ -2,7 +2,7 @@ name: "Build workflow"
on:
push:
branches: [ "main" ]
branches: [ "main", "next" ]
paths-ignore:
- "**.md"
- "LICENSE"
@@ -12,7 +12,7 @@ on:
- ".devcontainer/*"
- "!.github/workflows/pr-workflow.yml"
pull_request:
branches: [ "main" ]
branches: [ "main", "next" ]
paths-ignore:
- "**.md"
- "LICENSE"
@@ -28,12 +28,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Setup .NET
uses: actions/setup-dotnet@v4
uses: actions/setup-dotnet@v5
with:
dotnet-version: 8.0.x
dotnet-version: 10.0.x
- run: dotnet restore
- run: dotnet build --no-restore
@@ -46,7 +46,7 @@ jobs:
with:
name: SimpleOTP
path: libraries/SimpleOTP/bin/Debug/EugeneFox.SimpleOTP*.*nupkg
- name: Drop SimpleOTP.DependencyInjection
uses: actions/upload-artifact@main
with:
+3 -3
View File
@@ -10,12 +10,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Setup .NET
uses: actions/setup-dotnet@v4
uses: actions/setup-dotnet@v5
with:
dotnet-version: 8.0.x
dotnet-version: 10.0.x
- run: dotnet restore
- run: dotnet pack
+1 -1
View File
@@ -1,6 +1,6 @@
MIT License
Copyright (c) 2024 Eugene Fox
Copyright (c) 2025 Eugene Fox
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
+7 -7
View File
@@ -1,7 +1,7 @@
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/xfox111/SimpleOTP)](https://github.com/xfox111/SimpleOTP/releases/latest)
[![GitHub last commit](https://img.shields.io/github/last-commit/xfox111/SimpleOTP?label=Last+update)](https://github.com/XFox111/SimpleOTP/commits/main)
![SimpleOTP](https://github.com/user-attachments/assets/d0e7f67a-61e0-49db-9ce9-5e20af328c96)
![SimpleOTP](https://raw.githubusercontent.com/XFox111/SimpleOTP/refs/heads/main/assets/banner.svg)
Feature-rich and flexible .NET library for implementation of OTP authenticators and validatiors.
@@ -48,14 +48,14 @@ If you are interested in fixing issues and contributing directly to the code bas
---
[![Twitter Follow](https://img.shields.io/twitter/follow/xfox111?style=social)](https://twitter.com/xfox111)
[![GitHub followers](https://img.shields.io/github/followers/xfox111?label=Follow%20@xfox111&style=social)](https://github.com/xfox111)
[![Buy Me a Coffee](https://img.shields.io/badge/Buy%20Me%20a%20Coffee-%40xfox111-orange)](https://buymeacoffee.com/xfox111)
[![Bluesky](https://img.shields.io/badge/%40xfox111.net-BSky?logo=bluesky&logoColor=%230285FF&label=Bluesky&labelColor=white&color=%230285FF)](https://bsky.app/profile/xfox111.net)
[![GitHub](https://img.shields.io/badge/%40xfox111-GitHub?logo=github&logoColor=%23181717&label=GitHub&labelColor=white&color=%23181717)](https://github.com/xfox111)
[![Buy Me a Coffee](https://img.shields.io/badge/%40xfox111-BMC?logo=buymeacoffee&logoColor=black&label=Buy%20me%20a%20coffee&labelColor=white&color=%23FFDD00)](https://buymeacoffee.com/xfox111)
> ©2024 Eugene Fox. Licensed under [MIT license][mit]
> ©2026 Eugene Fox. Licensed under [MIT license][mit]
[RFC-6238]: https://
[RFC-4226]: https://
[RFC-6238]: https://www.rfc-editor.org/rfc/rfc6238
[RFC-4226]: https://www.rfc-editor.org/rfc/rfc4226
[otpauth-ID]: https://www.ietf.org/archive/id/draft-linuxgemini-otpauth-uri-00.html
[nuget]: https://www.nuget.org/packages/EugeneFox.SimpleOTP
[nuget-di]: https://www.nuget.org/packages/EugeneFox.SimpleOTP.DependencyInjection
+4 -4
View File
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
@@ -10,9 +10,9 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="NUnit" Version="4.2.2" />
<PackageReference Include="NUnit3TestAdapter" Version="4.6.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>
+71
View File
@@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 512">
<defs>
<style>
.cls-1 {
stroke: #0e700e;
}
.cls-1,
.cls-2 {
fill: none;
stroke-linecap: round;
stroke-miterlimit: 10;
stroke-width: 12.69px;
}
.cls-2 {
opacity: .5;
stroke: #9fd89f;
}
.cls-3 {
fill: #0e700e;
}
.cls-4 {
fill: #242424;
}
@media (prefers-color-scheme: dark) {
.cls-1 {
stroke: #54b054;
}
.cls-2 {
stroke: #094509;
}
.cls-3 {
fill: #54b054;
}
.cls-4 {
fill: #ffffff;
}
}
</style>
</defs>
<circle class="cls-2" cx="412.24" cy="239.44" r="93.87" />
<g>
<path class="cls-4"
d="M461.84,211.45v-19.62l2.8-7.47c2.49.62,4.05,2.18,4.67,4.67v26.16l-1.87,1.87-5.6-5.6ZM467.44,217.99l1.87,1.87v26.16c-.62,2.49-2.18,4.05-4.67,4.67l-2.8-7.47v-19.62l5.6-5.6Z" />
<path class="cls-4"
d="M496.4,193.71v17.75l-5.6,5.6-1.87-1.87v-24.29l7.47,2.8ZM496.4,224.53v19.62l-2.8,7.47c-2.49-.62-4.05-2.18-4.67-4.67v-26.16l1.87-1.87,5.6,5.61ZM518.82,191.84h-22.33l-7.47-2.8c.62-2.49,2.18-4.05,4.67-4.67h27.93l-2.8,7.47ZM512.28,215.19l-3.74,3.74-3.74-3.74v-21.48h7.47v21.48ZM520.68,211.45v-19.62l2.8-7.47c2.49.62,4.05,2.18,4.67,4.67v26.16l-1.87,1.87-5.6-5.6ZM526.29,218.93l1.87,1.87v26.16c-.62,2.49-2.18,4.05-4.67,4.67l-2.8-7.47v-19.62l5.6-5.61Z" />
<path class="cls-4"
d="M577.66,191.84h-22.42l-7.47-2.8v-4.67h29.89l3.74,3.74-3.74,3.74ZM555.25,193.71v17.75l-5.6,5.6-1.87-1.87v-24.29l7.47,2.8ZM555.25,224.53v19.62l-2.8,7.47c-2.49-.62-4.05-2.18-4.67-4.67v-26.16l1.87-1.87,5.6,5.61ZM579.53,214.26l3.74,3.74-3.74,3.74h-24.29l-3.74-3.74,3.74-3.74h24.29ZM579.53,211.45v-19.62l2.8-2.8,4.67,4.67v21.48l-1.87,1.87-5.6-5.6Z" />
<path class="cls-4"
d="M608.49,217.06l-1.87-1.87v-26.16c.62-2.49,2.18-4.05,4.67-4.67l2.8,7.47v19.62l-5.6,5.6ZM614.09,224.53v19.62l-2.8,7.47c-2.49-.62-4.05-2.18-4.67-4.67v-26.16l1.87-1.87,5.6,5.61ZM615.96,244.15h22.42l7.47,2.8c-.62,2.49-2.18,4.05-4.67,4.67h-28.02l2.8-7.47Z" />
<path class="cls-4"
d="M672.94,193.71v17.75l-5.6,5.6-1.87-1.87v-24.29l7.47,2.8ZM665.47,245.08v-24.29l1.87-1.87,5.6,5.61v17.75l-7.47,2.8ZM700.97,251.62h-30.83c-2.49-.62-4.05-2.18-4.67-4.67l7.47-2.8h25.22l2.8,7.47ZM698.16,191.84h-25.13l-7.47-2.8c.62-2.49,2.18-4.05,4.67-4.67h30.73l-2.8,7.47ZM697.23,214.26l3.74,3.74-3.74,3.74h-24.29l-3.74-3.74,3.74-3.74h24.29Z" />
</g>
<path class="cls-1"
d="M412.24,145.57c-51.85,0-93.87,42.03-93.87,93.87s42.03,93.87,93.87,93.87c40.19,0,74.46-25.24,87.86-60.74" />
<path class="cls-4"
d="M394.28,200.33v28.6l-9.03,9.03-3.01-3.01v-39.14l12.04,4.52ZM434.92,293.66h-45.16c-4.02-1-6.52-3.51-7.53-7.53l12.04-4.52h36.13l4.52,12.04ZM394.43,197.32l-12.04-4.52c1-4.01,3.51-6.52,7.53-7.53h48.02c4.01,1,6.52,3.51,7.53,7.53l-12.04,4.52h-38.99ZM433.42,233.44l6.02,6.02-6.02,6.02h-39.14l-6.02-6.02,6.02-6.02h39.14ZM442.45,240.97l3.01,3.01v42.15c-1,4.01-3.51,6.52-7.53,7.53l-4.52-12.04v-31.61l9.03-9.03Z" />
<g>
<path class="cls-3" d="M574.97,273.46h-20.12v61.81h-11.94v-61.81h-20.07v-10.13h52.13v10.13Z" />
<path class="cls-3"
d="M597.55,310.24v25.04h-11.94v-71.95h22.18c8.26,0,14.61,1.93,19.04,5.79,4.43,3.86,6.65,9.42,6.65,16.68s-2.48,13.31-7.43,17.76c-4.95,4.45-11.62,6.67-20.02,6.67h-8.48ZM597.55,273.11v27.29h7.93c4.98,0,8.81-1.23,11.46-3.69,2.66-2.46,3.99-5.93,3.99-10.41s-1.25-7.59-3.74-9.83c-2.49-2.24-6.18-3.36-11.06-3.36h-8.58Z" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.4 KiB

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
@@ -9,9 +9,9 @@
<PropertyGroup>
<PackageId>EugeneFox.SimpleOTP.DependencyInjection</PackageId>
<Version>8.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>
Initial release. See README.md for details.
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="8.0.*" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions"
Version="8.0.*" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="10.0.8" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="10.0.8" />
</ItemGroup>
</Project>
-2
View File
@@ -2,8 +2,6 @@ using System.Security.Cryptography;
namespace SimpleOTP;
// TODO: Add tests
/// <summary>
/// Represents an abstract class for generating and validating One-Time Passwords (OTP).
/// </summary>
@@ -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)
+5 -4
View File
@@ -1,10 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<IsAotCompatible>true</IsAotCompatible>
</PropertyGroup>
<PropertyGroup>
@@ -14,9 +15,9 @@
<PropertyGroup>
<PackageId>EugeneFox.SimpleOTP</PackageId>
<Version>8.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>
@@ -35,7 +36,7 @@
Feature-rich, fast, and customizable library for implementation TOTP/HOTP authenticators and validators.
</Description>
<PackageReleaseNotes>
(BREAKING CHANGE) Complete overhaul of the library. See https://github.com/XFox111/SimpleOTP/releases/tag/2.0.0 for more details.
- Fixed OTP config incorrect validation of TOTP period and code length.
</PackageReleaseNotes>
</PropertyGroup>