Tago.Extensions.Jwt
6.0.9
dotnet add package Tago.Extensions.Jwt --version 6.0.9
NuGet\Install-Package Tago.Extensions.Jwt -Version 6.0.9
<PackageReference Include="Tago.Extensions.Jwt" Version="6.0.9" />
<PackageVersion Include="Tago.Extensions.Jwt" Version="6.0.9" />
<PackageReference Include="Tago.Extensions.Jwt" />
paket add Tago.Extensions.Jwt --version 6.0.9
#r "nuget: Tago.Extensions.Jwt, 6.0.9"
#:package Tago.Extensions.Jwt@6.0.9
#addin nuget:?package=Tago.Extensions.Jwt&version=6.0.9
#tool nuget:?package=Tago.Extensions.Jwt&version=6.0.9
Tago.Extensions.Jwt
Tago.Extensions.Jwt is a .NET Core package that simplifies JWT authentication and token signing for ASP.NET Core applications.
It provides extension methods for registering JWT validation and signing services, along with built-in support for policy-based validation and configurable token settings.
Features
- Easy
AddJwt()integration for ASP.NET Core authentication - JWT bearer token validation with configurable validation settings
- Support for custom token validation policies
- JWT signing support via
AddJwtSigner() - Works with
JwtBearerDefaults.AuthenticationScheme - Includes a reusable core package for JWT operations
Package Metadata
- Package:
Tago.Extensions.Jwt - Authors:
Tago-Solutions Ltd. - License:
Apache-2.0 - Repository:
https://github.com/tago-solutions/Tago.Extensions.Jwt
Install
Install using NuGet Package Manager:
Install-Package Tago.Extensions.Jwt -Version 6.0.8
Or add the package reference directly in your project file:
<PackageReference Include="Tago.Extensions.Jwt" Version="6.0.8" />
Quick Start
Register JWT validation services in Startup.ConfigureServices:
public void ConfigureServices(IServiceCollection services)
{
services.AddRestClient();
services.AddJwt(opts =>
{
opts.Configure(Configuration.GetSection("JwtSettings"));
});
services.AddJwtSigner(opts =>
{
opts.Configure(Configuration.GetSection("JwtSigner"));
});
services.AddControllers();
}
Enable middleware in Startup.Configure:
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.UseAuthentication();
app.UseRouting();
app.UseAuthorization();
app.UseEndpoints(endpoints =>
{
endpoints.MapControllers();
});
}
You may also use the provided helper extension:
app.UseJwt();
Configuration
JwtSettings
Configure JWT validation settings in appsettings.json or any configuration provider:
{
"JwtSettings": {
"Keys": [
{
"Selector": "_Default",
"KeySettings": {
"Jwks": {
"Path": "https://example.com/.well-known/jwks.json"
}
}
}
]
}
}
JwtSigner
Configure JWT signing options:
{
"JwtSigner": {
"Keys": [
{
"Selector": "default",
"KeySettings": {
"SymmetricKey": {
"Key": "someSecretKey",
"SecurityAlgorithm": "HS256"
}
}
}
]
}
}
Usage
services.AddJwt(opts => opts.Configure(...));to register token validationservices.AddJwtSigner(opts => opts.Configure(...));to register signing supportapp.UseJwt()to enable authentication and authorization middleware- Policies can be configured using the package's validator and policy APIs
Development
Build the solution from the repository root:
dotnet build Tago.Extensions.Jwt.sln
Run tests from the Tests folder if available:
dotnet test Tago.Extensions.Jwt.sln
Contributing
Contributions are welcome. Please open issues or pull requests in the repository, and follow these guidelines:
- Use descriptive commit messages
- Keep feature changes small and self-contained
- Add tests for bug fixes and new features
- Update documentation when APIs change
License
This project is licensed under the Apache 2.0 License.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. 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 is compatible. 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. |
| .NET Core | netcoreapp3.1 is compatible. |
-
.NETCoreApp 3.1
- Microsoft.AspNetCore.Authentication.JwtBearer (>= 3.1.0)
- Tago.Extensions.Jwt.Core (>= 6.0.9)
-
net10.0
- Microsoft.AspNetCore.Authentication.JwtBearer (>= 3.1.0)
- Tago.Extensions.Jwt.Core (>= 6.0.9)
-
net6.0
- Microsoft.AspNetCore.Authentication.JwtBearer (>= 3.1.0)
- Tago.Extensions.Jwt.Core (>= 6.0.9)
-
net8.0
- Microsoft.AspNetCore.Authentication.JwtBearer (>= 3.1.0)
- Tago.Extensions.Jwt.Core (>= 6.0.9)
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 |
|---|---|---|
| 6.0.9 | 98 | 6/7/2026 |
| 6.0.7 | 141 | 1/20/2026 |
| 6.0.6 | 127 | 1/7/2026 |
| 6.0.5 | 215 | 12/22/2025 |
| 6.0.4 | 259 | 5/27/2025 |
| 6.0.3 | 242 | 5/27/2025 |
| 6.0.2 | 224 | 5/27/2025 |
| 6.0.1 | 219 | 2/27/2025 |
| 6.0.0 | 201 | 1/7/2025 |
| 3.1.1-preview-20241101-01 | 188 | 11/7/2024 |
| 3.1.1-preview-20240401-01 | 196 | 4/30/2024 |
| 3.1.1-preview-20240317-01 | 214 | 3/17/2024 |
| 3.1.1-preview-20231020-01 | 252 | 11/2/2023 |
| 3.1.1-preview-20230528-01 | 548 | 5/31/2023 |
| 3.1.1-preview-20221116-01 | 339 | 1/7/2023 |
| 3.1.1-preview-20220516-01 | 326 | 5/16/2022 |
| 3.1.1-preview-20211201-01 | 374 | 12/2/2021 |
| 3.1.1-preview-20211128-01 | 347 | 11/29/2021 |
| 3.1.1-preview-20211122-02 | 364 | 11/23/2021 |