Tago.Extensions.Jwt.Core
6.0.9
dotnet add package Tago.Extensions.Jwt.Core --version 6.0.9
NuGet\Install-Package Tago.Extensions.Jwt.Core -Version 6.0.9
<PackageReference Include="Tago.Extensions.Jwt.Core" Version="6.0.9" />
<PackageVersion Include="Tago.Extensions.Jwt.Core" Version="6.0.9" />
<PackageReference Include="Tago.Extensions.Jwt.Core" />
paket add Tago.Extensions.Jwt.Core --version 6.0.9
#r "nuget: Tago.Extensions.Jwt.Core, 6.0.9"
#:package Tago.Extensions.Jwt.Core@6.0.9
#addin nuget:?package=Tago.Extensions.Jwt.Core&version=6.0.9
#tool nuget:?package=Tago.Extensions.Jwt.Core&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 was computed. 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 was computed. 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 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. |
| .NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 is compatible. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- Microsoft.AspNetCore.Authentication.JwtBearer (>= 2.2.0)
- Microsoft.AspNetCore.Routing (>= 2.2.2)
- Microsoft.Extensions.Identity.Core (>= 3.1.0)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 3.1.0)
- System.IdentityModel.Tokens.Jwt (>= 5.7.0)
- Tago.Extensions.HttpClient (>= 8.0.18)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Tago.Extensions.Jwt.Core:
| Package | Downloads |
|---|---|
|
Tago.Extensions.Jwt
Jwt extension |
|
|
Tago.Extensions.ReverseProxy.Abstractions
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 6.0.9 | 140 | 6/7/2026 |
| 6.0.7 | 179 | 1/20/2026 |
| 6.0.6 | 162 | 1/7/2026 |
| 6.0.5 | 262 | 12/22/2025 |
| 6.0.4 | 289 | 5/27/2025 |
| 6.0.3 | 266 | 5/27/2025 |
| 6.0.2 | 280 | 5/27/2025 |
| 6.0.1 | 285 | 2/27/2025 |
| 6.0.0 | 236 | 1/7/2025 |
| 3.1.1-preview-20241101-01 | 218 | 11/7/2024 |
| 3.1.1-preview-20240401-01 | 241 | 4/30/2024 |
| 3.1.1-preview-20240317-01 | 264 | 3/17/2024 |
| 3.1.1-preview-20240102-01 | 210 | 2/25/2024 |
| 3.1.1-preview-20231020-01 | 308 | 11/2/2023 |
| 3.1.1-preview-20230528-01 | 555 | 5/31/2023 |
| 3.1.1-preview-20221116-01 | 387 | 1/7/2023 |
| 3.1.1-preview-20220516-01 | 380 | 5/16/2022 |
| 3.1.1-preview-20211201-01 | 425 | 12/2/2021 |
| 3.1.1-preview-20211128-01 | 373 | 11/29/2021 |