Jovanne.Jwks.Client 1.0.0

dotnet add package Jovanne.Jwks.Client --version 1.0.0
                    
NuGet\Install-Package Jovanne.Jwks.Client -Version 1.0.0
                    
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="Jovanne.Jwks.Client" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Jovanne.Jwks.Client" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Jovanne.Jwks.Client" />
                    
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 Jovanne.Jwks.Client --version 1.0.0
                    
#r "nuget: Jovanne.Jwks.Client, 1.0.0"
                    
#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 Jovanne.Jwks.Client@1.0.0
                    
#: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=Jovanne.Jwks.Client&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Jovanne.Jwks.Client&version=1.0.0
                    
Install as a Cake Tool

Jovanne.Jwks.Client

Pacote para APIs ASP.NET Core que precisam validar tokens JWT usando a chave publica exposta por um endpoint JWKS.

Este pacote nao depende de DbContext, ASP.NET Core Identity ou Entity Framework Core. Ele e indicado para servicos consumidores de tokens.

Instalacao

dotnet add package Jovanne.Jwks.Client

Configuracao

Registre a autenticacao JWT no Program.cs:

builder.Services.AddJovanneJwksClient(
    builder.Configuration,
    builder.Environment.IsDevelopment());

Configure a secao JwtSettings:

{
  "JwtSettings": {
    "AutenticacaoJwksUrl": "https://auth.example.com",
    "Issuer": "https://auth.example.com"
  }
}

AutenticacaoJwksUrl e obrigatorio. O pacote consulta as chaves em {AutenticacaoJwksUrl}/jwks.

Issuer e opcional. Quando nao informado, o valor de AutenticacaoJwksUrl e usado como emissor.

Recursos incluidos

  • Configuracao de JwtBearer.
  • Validacao de assinatura por JWKS.
  • Respostas JSON padronizadas para 401 Unauthorized e 403 Forbidden.
  • ClaimsAuthorizeAttribute para proteger endpoints por claim.
  • IUser e AspNetUser para acessar dados do usuario autenticado.
  • Extensoes para obter id e e-mail a partir de ClaimsPrincipal.

Exemplo de autorizacao por claim

[ClaimsAuthorize("orders:read")]
public IActionResult GetOrders()
{
    return Ok();
}

Por padrao, o nome da claim e permission. Para usar outro nome:

[ClaimsAuthorize("admin", "role")]
public IActionResult Admin()
{
    return Ok();
}

Dependencias

  • Microsoft.AspNetCore.App
  • NetDevPack.Security.JwtExtensions
Product Compatible and additional computed target framework versions.
.NET 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Jovanne.Jwks.Client:

Package Downloads
Jovanne.Jwks

Pacote agregador para configurar client e server JWKS em uma mesma aplicacao ASP.NET Core.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 163 6/24/2026