JWT.Standard 2.0.1.9

There is a newer version of this package available.
See the version list below for details.
dotnet add package JWT.Standard --version 2.0.1.9                
NuGet\Install-Package JWT.Standard -Version 2.0.1.9                
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="2.0.1.9" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add JWT.Standard --version 2.0.1.9                
#r "nuget: JWT.Standard, 2.0.1.9"                
#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.
// Install JWT.Standard as a Cake Addin
#addin nuget:?package=JWT.Standard&version=2.0.1.9

// Install JWT.Standard as a Cake Tool
#tool nuget:?package=JWT.Standard&version=2.0.1.9                

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 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. 
.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.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on JWT.Standard:

Package Downloads
TJC.Cyclops.Web.Core

企服版框架中api核心功能项目

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
3.1.8.6 5,914 1/29/2023
3.0.0.3 454 8/5/2022
3.0.0.2 422 8/5/2022
2.0.1.9 401 8/5/2022
2.0.1.8 406 8/3/2022
2.0.1.7 416 8/3/2022
2.0.1.6 391 8/3/2022
2.0.0.2 436 6/24/2022
1.0.0.6 442 6/23/2022
1.0.0.5 402 6/23/2022
1.0.0.4 421 6/22/2022
1.0.0.3 1,267 8/6/2020
1.0.0.2 671 8/6/2020
1.0.0.1 678 8/6/2020

JWT.Standard a JWT (JSON Web Token) implementation for .NET
source site:https://github.com/cnwenli/JWT.Net