Skip to content

Commit

Permalink
Downgrading target framework version to .NET 3.5 (#71)
Browse files Browse the repository at this point in the history
* Downgrading target framework version to .NET 3.5
* Bumping nuget version to 2.2.0-beta
  • Loading branch information
abatishchev authored Apr 3, 2017
1 parent c9e01e6 commit 29424f7
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion JWT.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package>
<metadata>
<id>JWT</id>
<version>2.1.1-beta</version>
<version>2.2.0-beta</version>
<authors>John Sheehan, Michael Lehenbauer, Alexander Batishchev</authors>
<owners>johnsheehan, devinrader, abatishchev</owners>
<description>Jwt.Net, a JWT (JSON Web Token) implementation for .NET</description>
Expand Down
4 changes: 2 additions & 2 deletions src/JWT/JWT.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>JWT</RootNamespace>
<AssemblyName>JWT</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
Expand All @@ -36,7 +36,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<HintPath>..\..\packages\Newtonsoft.Json.9.0.1\lib\net35\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
Expand Down
6 changes: 3 additions & 3 deletions src/JWT/JsonWebToken.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public static class JsonWebToken
/// </summary>
public static IJsonSerializer JsonSerializer = new JsonNetSerializer();

private static readonly Lazy<IJwtValidator> _jwtValidator = new Lazy<IJwtValidator>(() => new JwtValidator(JsonSerializer, new UtcDateTimeProvider()));
private static readonly IJwtValidator _jwtValidator = new JwtValidator(JsonSerializer, new UtcDateTimeProvider());

private static readonly AlgorithmFactory _algorithmFactory = new AlgorithmFactory();

Expand Down Expand Up @@ -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);
}

Expand Down Expand Up @@ -177,7 +177,7 @@ public static T DecodeToObject<T>(string token, byte[] key, bool verify = true)
/// <exception cref="TokenExpiredException">The token has expired.</exception>
public static void Verify(string payloadJson, string decodedCrypto, string decodedSignature)
{
_jwtValidator.Value.Validate(payloadJson, decodedCrypto, decodedSignature);
_jwtValidator.Validate(payloadJson, decodedCrypto, decodedSignature);
}

/// <remarks>From JWT spec</remarks>
Expand Down
2 changes: 1 addition & 1 deletion src/JWT/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net461" />
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net35" />
</packages>

0 comments on commit 29424f7

Please sign in to comment.