JwtCraft 1.1.2

dotnet add package JwtCraft --version 1.1.2
                    
NuGet\Install-Package JwtCraft -Version 1.1.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="JwtCraft" Version="1.1.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="JwtCraft" Version="1.1.2" />
                    
Directory.Packages.props
<PackageReference Include="JwtCraft" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add JwtCraft --version 1.1.2
                    
#r "nuget: JwtCraft, 1.1.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package JwtCraft@1.1.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=JwtCraft&version=1.1.2
                    
Install as a Cake Addin
#tool nuget:?package=JwtCraft&version=1.1.2
                    
Install as a Cake Tool

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.2 208 9/8/2025
1.1.1 212 9/7/2025
1.1.0 348 9/7/2025 1.1.0 is deprecated because it has critical bugs.
1.0.0 353 9/7/2025 1.0.0 is deprecated because it has critical bugs.