JWT.Standard
2025.5.7.1
dotnet add package JWT.Standard --version 2025.5.7.1
NuGet\Install-Package JWT.Standard -Version 2025.5.7.1
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="JWT.Standard" Version="2025.5.7.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="JWT.Standard" Version="2025.5.7.1" />
<PackageReference Include="JWT.Standard" />
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 JWT.Standard --version 2025.5.7.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: JWT.Standard, 2025.5.7.1"
#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 JWT.Standard@2025.5.7.1
#: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=JWT.Standard&version=2025.5.7.1
#tool nuget:?package=JWT.Standard&version=2025.5.7.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
JWT
JWT.Net
Create Signature
var password = Guid.NewGuid().ToString("N");
var jwtp1 = new JWTPackage("yswenli",
"jwt test",
"everyone",
DateTimeHelper.Now.AddMinutes(3).GetTimeStamp().ToString(),
DateTimeHelper.Now.ToString(), DateTimeHelper.Now.ToString(),
Guid.NewGuid().ToString("N"),
password);
var sign = jwtp1.GetBearerToken();
var password = Guid.NewGuid().ToString("N");
var jwtp1 = new JWTPackage<User>(new User()
{
Id = "1",
Name = "yswenli",
Role = "Admin"
}, 180, password);
var sign = jwtp1.GetBearerToken();
Valide
JWTPackage jwtp2 = null;
try
{
jwtp2 = JWTPackage.Parse(sign, password);
}
catch (IllegalTokenException iex)
{
Console.WriteLine($"解析失败:{iex.Message}");
}
catch (TokenExpiredException tex)
{
Console.WriteLine($"解析失败:{tex.Message}");
}
catch (SignatureVerificationException sex)
{
Console.WriteLine($"解析失败:{sex.Message}");
}
catch (Exception ex)
{
Console.WriteLine($"解析失败:{ex.Message}");
}
if (jwtp2 != null)
Console.WriteLine($"jwtp2.data:{jwtp2.Payload.Data}");
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. 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 was computed. 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 was computed. 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 Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- System.Reflection.Emit.Lightweight (>= 4.7.0)
- System.Security.Permissions (>= 9.0.4)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on JWT.Standard:
| Package | Downloads |
|---|---|
|
TJC.Cyclops.Web.Core
企服版框架中api核心功能项目,基于aspnetcore集成di、jwt、swagger、codefirtst、支持多种常见数据库、nacos配置中心、统一接口回复参数、全局异常捕获、全局接口日志、防重放攻击、图形验证码、快捷上下文对象、上传下载、数据导入导出等功能 |
|
|
RiverLand.FrameWork.AspnetCore
框架中的web api相关功能 |
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on JWT.Standard:
| Repository | Stars |
|---|---|
|
yswenli/SAEA
SAEA.Socket is a zero-copy, high-performance sockets network framework built on IOCP and targeting .NET Standard 2.0. The source code (Src) includes demo use cases such as P2P, SOCKS5, WebSocket client and server, message queue, RPC, Redis driver, HTTP server, MQTT, MVC, DNS, message server, and more.
|
| Version | Downloads | Last Updated |
|---|---|---|
| 2025.5.7.1 | 9,845 | 5/7/2025 |
| 2025.4.10.1 | 793 | 4/10/2025 |
| 3.1.8.6 | 12,201 | 1/29/2023 |
| 3.0.0.3 | 645 | 8/5/2022 |
| 3.0.0.2 | 623 | 8/5/2022 |
| 2.0.1.9 | 600 | 8/5/2022 |
| 2.0.1.8 | 592 | 8/3/2022 |
| 2.0.1.7 | 625 | 8/3/2022 |
| 2.0.1.6 | 584 | 8/3/2022 |
| 2.0.0.2 | 635 | 6/24/2022 |
| 1.0.0.6 | 652 | 6/23/2022 |
| 1.0.0.5 | 599 | 6/23/2022 |
| 1.0.0.4 | 613 | 6/22/2022 |
| 1.0.0.3 | 1,518 | 8/6/2020 |
| 1.0.0.2 | 906 | 8/6/2020 |
| 1.0.0.1 | 915 | 8/6/2020 |
JWT.Standard a JWT (JSON Web Token) implementation for .NET
source site:https://github.com/cnwenli/JWT.Net