From 47c15bfbec318f69086ee58bb4c3777a5958a4cf Mon Sep 17 00:00:00 2001 From: Alex Batishchev Date: Fri, 24 Mar 2017 11:16:30 -0700 Subject: [PATCH 1/2] Downgrading target framework version to .NET 3.5 --- src/JWT/JWT.csproj | 4 ++-- src/JWT/JsonWebToken.cs | 6 +++--- src/JWT/packages.config | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/JWT/JWT.csproj b/src/JWT/JWT.csproj index 7861638a6..ab1ba5c04 100644 --- a/src/JWT/JWT.csproj +++ b/src/JWT/JWT.csproj @@ -10,7 +10,7 @@ Properties JWT JWT - v4.6.1 + v3.5 512 @@ -36,7 +36,7 @@ - ..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll + ..\..\packages\Newtonsoft.Json.9.0.1\lib\net35\Newtonsoft.Json.dll True diff --git a/src/JWT/JsonWebToken.cs b/src/JWT/JsonWebToken.cs index 545132086..11dd26d6b 100644 --- a/src/JWT/JsonWebToken.cs +++ b/src/JWT/JsonWebToken.cs @@ -19,7 +19,7 @@ public static class JsonWebToken /// public static IJsonSerializer JsonSerializer = new JsonNetSerializer(); - private static readonly Lazy _jwtValidator = new Lazy(() => new JwtValidator(JsonSerializer, new UtcDateTimeProvider())); + private static readonly IJwtValidator _jwtValidator = new JwtValidator(JsonSerializer, new UtcDateTimeProvider()); private static readonly AlgorithmFactory _algorithmFactory = new AlgorithmFactory(); @@ -103,7 +103,7 @@ public static string Decode(string token, byte[] key, bool verify = true) { return new JwtDecoder( JsonSerializer, - _jwtValidator.Value) + _jwtValidator) .Decode(token, key, verify); } @@ -177,7 +177,7 @@ public static T DecodeToObject(string token, byte[] key, bool verify = true) /// The token has expired. public static void Verify(string payloadJson, string decodedCrypto, string decodedSignature) { - _jwtValidator.Value.Validate(payloadJson, decodedCrypto, decodedSignature); + _jwtValidator.Validate(payloadJson, decodedCrypto, decodedSignature); } /// From JWT spec diff --git a/src/JWT/packages.config b/src/JWT/packages.config index e8313a737..99eaa2547 100644 --- a/src/JWT/packages.config +++ b/src/JWT/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file From e0a3029be5f45612d07bfde21c7abc7878370c34 Mon Sep 17 00:00:00 2001 From: Alex Batishchev Date: Fri, 24 Mar 2017 11:20:30 -0700 Subject: [PATCH 2/2] Bumping nuget version to 2.2.0-beta --- JWT.nuspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/JWT.nuspec b/JWT.nuspec index eca621d49..d4cf50a60 100644 --- a/JWT.nuspec +++ b/JWT.nuspec @@ -2,7 +2,7 @@ JWT - 2.1.0-beta + 2.2.0-beta John Sheehan, Michael Lehenbauer, Alexander Batishchev johnsheehan, devinrader, abatishchev Jwt.Net, a JWT (JSON Web Token) implementation for .NET