Added .net standard 2.0 and .net framework 4.8 support

This commit is contained in:
2026-06-19 20:17:05 +02:00
parent 038eb5d225
commit 8b2a776da4
13 changed files with 845 additions and 438 deletions
+9 -14
View File
@@ -1,18 +1,17 @@
using FluentAssertions;
using SecureToken.Core;
using SecureToken.Cryptography;
using SecureToken.Validation;
using EonaCat.SecureToken.Core;
using EonaCat.SecureToken.Cryptography;
using EonaCat.SecureToken.Validation;
using Xunit;
namespace SecureToken.Tests
namespace EonaCat.SecureToken.Tests
{
public sealed class TokenServiceTests
{
private static ITokenService CreateService(SigningKeyStore? store = null) =>
new TokenService(store ?? SigningKeyStore.CreateNew());
// ── Issue & Validate ─────────────────────────────────────────────────────
// Issue & Validate
[Fact]
public void Issue_And_Validate_ReturnsSuccess()
{
@@ -142,8 +141,7 @@ namespace SecureToken.Tests
result.IsSuccess.Should().BeTrue();
}
// ── Key Rotation ─────────────────────────────────────────────────────────
// Key Rotation
[Fact]
public void KeyRotation_OldTokensRemainValid()
{
@@ -186,8 +184,7 @@ namespace SecureToken.Tests
result.IsSuccess.Should().BeTrue();
}
// ── Token Pair ───────────────────────────────────────────────────────────
// Token Pair
[Fact]
public void IssueTokenPair_ProducesValidPair()
{
@@ -213,8 +210,7 @@ namespace SecureToken.Tests
result.Should().BeOfType<TokenResult.WrongTokenType>();
}
// ── Revocation ───────────────────────────────────────────────────────────
// Revocation
[Fact]
public async Task RevocationCheck_RevokedToken_ReturnsRevoked()
{
@@ -237,8 +233,7 @@ namespace SecureToken.Tests
result.Should().BeOfType<TokenResult.Revoked>();
}
// ── Inspect (no signature check) ─────────────────────────────────────────
// Inspect (no signature check)
[Fact]
public void Inspect_MalformedToken_ReturnsNull()
{