JWT.Standard 3.0.0.3

.NET Standard 2.0
NuGet\Install-Package JWT.Standard -Version 3.0.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.
dotnet add package JWT.Standard --version 3.0.0.3
<PackageReference Include="JWT.Standard" Version="3.0.0.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add JWT.Standard --version 3.0.0.3
#r "nuget: JWT.Standard, 3.0.0.3"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. 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=3.0.0.3

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

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
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows
.NET Core netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
.NET Standard netstandard2.0 netstandard2.1
.NET Framework net461 net462 net463 net47 net471 net472 net48
MonoAndroid monoandroid
MonoMac monomac
MonoTouch monotouch
Tizen tizen40 tizen60
Xamarin.iOS xamarinios
Xamarin.Mac xamarinmac
Xamarin.TVOS xamarintvos
Xamarin.WatchOS xamarinwatchos
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on JWT.Standard:

Repository Stars
yswenli/SAEA
SAEA.Socket is a high-performance IOCP framework TCP based on dotnet standard 2.0; Src contains its application test scenarios, such as websocket,rpc, redis driver, MVC WebAPI, lightweight message server, ultra large file transmission, etc. SAEA.Socket是一个高性能IOCP框架的 TCP,基于dotnet standard 2.0;Src中含有其应用测试场景,例如websocket、rpc、redis驱动、MVC WebAPI、轻量级消息服务器、超大文件传输等
Version Downloads Last updated
3.0.0.3 74 8/5/2022
3.0.0.2 50 8/5/2022
2.0.1.9 52 8/5/2022
2.0.1.8 57 8/3/2022
2.0.1.7 53 8/3/2022
2.0.1.6 50 8/3/2022
2.0.0.2 93 6/24/2022
1.0.0.6 77 6/23/2022
1.0.0.5 75 6/23/2022
1.0.0.4 64 6/22/2022
1.0.0.3 860 8/6/2020
1.0.0.2 280 8/6/2020
1.0.0.1 288 8/6/2020

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