.NET DevPack JwtExtensions was created to help you validate Bearer tokens from Jwks endpoint. It configure your ASP.NET Core with JWT Bearer Token using a Custom JWKS Endpoint. Giving hability to leverage the security of your environment using Assymetric Keys. Which is by far a most recommended cryptography to digitally signin you JWT.
If you liked the project or if NetDevPack helped you, please give a star ;)
| Package | Version | Popularity |
|---|---|---|
NetDevPack.Security.JwtExtensions |
.NET DevPack.JwtExtensions can be installed in your ASP.NET Core application using the Nuget package manager or the dotnet CLI.
dotnet add package NetDevPack.Security.JwtExtensions
| Version | Target frameworks |
|---|---|
| 10.x | .NET 10 (LTS) |
| 9.x | .NET Standard 2.1, .NET 8, .NET 9, .NET 10 |
Breaking change in v10: .NET Standard 2.1, .NET 8 and .NET 9 are no longer targeted. .NET 8 and .NET 9 are out of support since 2026-11-10, and the
netstandard2.1target pulled ASP.NET Core 2.1 packages with known vulnerabilities. If you need them, stay on 9.x. The public API did not change.
Then use Extension at configuration in ConfigureServices method of your Startup.cs:
services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
.AddJwtBearer(options =>
{
options.SetJwksOptions(new JwkOptions("https://localhost:5001/jwks"));
});If you want to generate JSON Web Tokens in your application you need to add the NetDevPack.Jwk.
Note: NetDevPack.Security.JwtExtensions is for those who already have an api who use
NetDevPack.JwkNote: The
NetDevPack.Jwkis a set of components who will generate Keys using industry security best standards (NIST Rotating keys, RSA Key Length, ECDsa P-256). It's supports Elliptic Curves and RSA as well.
Use the sample application to understand how NetDevPack.Security.JwtExtensions can be implemented and help you to decrease the complexity of your application and development time.
.NET DevPack.JwtExtensions was developed by Bruno Brito under the MIT license.