JwtCraft 1.1.2
dotnet add package JwtCraft --version 1.1.2
NuGet\Install-Package JwtCraft -Version 1.1.2
<PackageReference Include="JwtCraft" Version="1.1.2" />
<PackageVersion Include="JwtCraft" Version="1.1.2" />
<PackageReference Include="JwtCraft" />
paket add JwtCraft --version 1.1.2
#r "nuget: JwtCraft, 1.1.2"
#:package JwtCraft@1.1.2
#addin nuget:?package=JwtCraft&version=1.1.2
#tool nuget:?package=JwtCraft&version=1.1.2
JwtCraft 🔑
JwtCraft is a .NET library that simplifies the creation and validation of JWT tokens, while also providing Refresh Token generation in a fast and secure way. It was designed to make authentication in applications more practical, keeping control over expired tokens and ensuring the security of operations.
Installation is straightforward and can be done via .NET CLI using the command dotnet add package JwtCraft or via PowerShell with Install-Package JwtCraft.
To use the library, configure the static class JwtOptions by setting the following properties: SecretKey, Audience, Issuer and TokenValidInMinutes. ⚠️ It is essential that this configuration is done before calling builder.Services.AddAuthentication(), which takes an IConfiguration parameter and sets up the authentication operations for the application.
Next, register the service in the dependency injection container with builder.Services.AddScoped<ITokenService, JwtService>. After this, the library is ready to use. Any class that requires authentication can receive the ITokenService interface, which provides methods to create JWT tokens, generate Refresh Tokens, and retrieve the ClaimsPrincipal from expired tokens, ensuring greater security and control over sessions.
JwtCraft provides a simple, secure, and efficient integration for .NET applications, eliminating the complexity of manual token-based authentication. For more details, usage examples, and complete documentation, please refer to the official GitHub repository. 🚀
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net9.0
- Microsoft.AspNetCore (>= 2.3.0)
- Microsoft.AspNetCore.Authentication.JwtBearer (>= 9.0.8)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.