Vulcan.Tools.Identity 1.0.3

There is a newer version of this package available.
See the version list below for details.
dotnet add package Vulcan.Tools.Identity --version 1.0.3
                    
NuGet\Install-Package Vulcan.Tools.Identity -Version 1.0.3
                    
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="Vulcan.Tools.Identity" Version="1.0.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Vulcan.Tools.Identity" Version="1.0.3" />
                    
Directory.Packages.props
<PackageReference Include="Vulcan.Tools.Identity" />
                    
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 Vulcan.Tools.Identity --version 1.0.3
                    
#r "nuget: Vulcan.Tools.Identity, 1.0.3"
                    
#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 Vulcan.Tools.Identity@1.0.3
                    
#: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=Vulcan.Tools.Identity&version=1.0.3
                    
Install as a Cake Addin
#tool nuget:?package=Vulcan.Tools.Identity&version=1.0.3
                    
Install as a Cake Tool

Vulcan.Tools.Identity

JWT Bearer y generación/lectura de tokens, con claims que pueden ir cifrados (AES-GCM). Versión 1.0.3.

dotnet add package Vulcan.Tools.Identity --version 1.0.3

Dependencia Vulcan: Vulcan.Tools.Security 1.0.1.

Registro

using Vulcan.Tools.Identity.Extensions;

services.AddVulcanJWT(options =>
{
    options.KeyJWT = configuration["TokenSetting:KeyJWT"];
    options.KeyGcm = configuration["TokenSetting:KeyGcm"];
    options.HoursJWT = 24;
    options.EncryptClaims = true;
});

Configura el esquema JWT Bearer (sin issuer/audience, ClockSkew = Zero) y una respuesta 401 en JSON.

Quedan registrados: TokenSetting, ITokenGenerator, IClaimReaderService, ITokenService y ClaimsEndpointFilter.

Si usas el paquete Web, AddVulcanWebDataProviders() llama a AddVulcanJWT leyendo la sección TokenSetting (KeyJWT, KeyGcm, HoursJWT).

Generar un token

using Vulcan.Tools.Identity.Models;
using Vulcan.Tools.Identity.Services;

var info = new TokenInfo()
    .AddEmpresa(1)
    .AddUsuario(42)
    .AddNodo("mired")
    .AddClaim("rol", "admin");

string jwt = tokenService.GenerateToken(info);

// atajo
string jwt2 = tokenService.GenerarToken("mired", idEmpresa: 1, idUsuario: 42);

Claims estándar: VulcanIdentityClaims.Nodo, IdEmpresa, IdUsuario.

Leer claims en un endpoint

Con ClaimsEndpointFilter los claims quedan en HttpContext.Items:

using Vulcan.Tools.Identity.Extensions;

app.MapGet("/me", (HttpContext http) => new
{
    empresa = http.GetIdEmpresa(),
    usuario = http.GetIdUsuario(),
    nodo = http.GetNodo()
});

También: IClaimReaderService.GetTokenInfo(token) y ITokenService.GetBasicTokenInfo(token).

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 Vulcan.Tools.Identity:

Package Downloads
Vulcan.Tools.DataProviders.Web

Librería con helpers, middleware y clases base para acelerar el desarrollo de APIs web robustas con ASP.NET Core.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.1 168 11/17/2026
1.1.0 144 11/13/2026
1.0.5 194 10/2/2026
1.0.4 156 9/17/2026
1.0.3 134 9/17/2026
1.0.2 370 4/16/2026
1.0.1 139 4/16/2026
1.0.0 139 4/14/2026