Horseshoe.NET.Jwt 4.0.4

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

Horseshoe.NET icon

Horseshoe.NET.Jwt

A set of common methods and classes for handling JWTs and a subset of basic OAuth operations.

Code Examples

// mint a token
// note: the same digital signature crypto key that creates the digital signature is also used to validate it
TokenService.CreateAccessToken 
(
    tokenKey,            // e.g. encoding.GetBytes("ah476&ewj^!09")
    roles,               // e.g. { "All Contractors", "Domain Admin" }
    keyId,               // e.g. "0001"
    lifespanInSeconds,   // default is 3600 (1 hour)
    securityAlgorithm    // default is "HS256"
);                                            // "eyjg73ls0..." (encoded JWT)

// parse a token
// note: If ADFS '/token' provided the JWT roles will include Active Directory group memberships
TokenService.ParseToken("eyjg73ls0...");      // -> token as instance of AccessToken
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  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 is compatible.  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 is compatible.  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 Framework net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.0.4 87 6/26/2025
4.0.3 153 5/20/2025
4.0.1 134 2/8/2025
4.0.0.2 127 2/5/2025
3.1.6 125 12/4/2024
3.1.5 125 10/24/2024
3.1.4 147 7/5/2024
3.1.3 131 6/18/2024
3.1.2 151 6/8/2024
3.1.1 147 5/20/2024
3.1.0 191 1/27/2024
3.0.2 366 5/5/2023
3.0.1 334 2/20/2023
3.0.0.2 297 2/14/2023
3.0.0.1 292 2/13/2023
3.0.0 300 2/9/2023
2.0.4 676 11/5/2022
2.0.3 425 10/31/2022
2.0.2.1 1,023 10/14/2022
2.0.2 502 10/14/2022
2.0.1 596 10/7/2022
2.0.0 435 10/6/2022
1.6.2 840 9/12/2022
1.6.1 501 9/6/2022
1.6.0 462 9/5/2022
1.5.9 445 9/5/2022
1.5.8 505 8/24/2022
1.5.7 494 8/12/2022
1.5.6 968 7/28/2022
1.5.5.2 780 6/14/2022
1.5.5.1 483 6/14/2022
1.5.5 574 6/1/2022
1.5.4.1 497 6/1/2022
1.5.4 852 4/15/2022
1.5.3 535 4/13/2022
1.5.2 579 4/1/2022
1.5.1.4 517 4/1/2022
1.5.1.3 500 4/1/2022
1.5.1.2 526 3/31/2022
1.5.1.1 507 3/30/2022
1.5.1 497 3/30/2022