Skip to content

1.0.0 Beta

Pre-release
Pre-release

Choose a tag to compare

@SIRSoares33 SIRSoares33 released this 10 Jul 01:24
· 30 commits to main since this release

πŸ“¦ PsalmsJwtTokenService v1.0.0

✨ Initial stable release

PsalmsJwtTokenService is a lightweight and extensible JWT generator for .NET applications. This first version provides a clean and secure foundation for token-based authentication, fully configurable via IConfiguration.

πŸš€ Features

  • βœ… Secure JWT generation using HMAC-SHA256
  • βœ… Custom claims support
  • βœ… Reads values from IConfiguration (JWT:Key, Issuer, Audience, Expires)
  • βœ… Optional expiration handling (in hours)
  • βœ… Lazy-initialized cryptography objects
  • βœ… Fully covered with xUnit unit tests

πŸ”§ Required Configuration

{
  "JWT": {
    "Key": "your-secret-key",
    "Issuer": "your-api",
    "Audience": "your-client",
    "Expires": "2"
  }
}

πŸ›  Example Usage

var claims = new[]
{
    new Claim(ClaimTypes.Name, "John"),
    new Claim(ClaimTypes.NameIdentifier, "123")
};

var token = jwtService.GenerateToken(claims);