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
<PackageReference Include="Jovanne.Jwks.Client" Version="1.0.0" />
<PackageVersion Include="Jovanne.Jwks.Client" Version="1.0.0" />
<PackageReference Include="Jovanne.Jwks.Client" />
paket add Jovanne.Jwks.Client --version 1.0.0
#r "nuget: Jovanne.Jwks.Client, 1.0.0"
#:package Jovanne.Jwks.Client@1.0.0
#addin nuget:?package=Jovanne.Jwks.Client&version=1.0.0
#tool nuget:?package=Jovanne.Jwks.Client&version=1.0.0
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 Unauthorizede403 Forbidden. ClaimsAuthorizeAttributepara proteger endpoints por claim.IUsereAspNetUserpara 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.AppNetDevPack.Security.JwtExtensions
| Product | Versions 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. |
-
net10.0
- NetDevPack.Security.JwtExtensions (>= 9.0.1)
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 |