diff --git a/JWT.nuspec b/JWT.nuspec index 42dc8052b..d4cf50a60 100644 --- a/JWT.nuspec +++ b/JWT.nuspec @@ -2,7 +2,7 @@ JWT - 2.1.1-beta + 2.2.0-beta John Sheehan, Michael Lehenbauer, Alexander Batishchev johnsheehan, devinrader, abatishchev Jwt.Net, a JWT (JSON Web Token) implementation for .NET 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