-
Notifications
You must be signed in to change notification settings - Fork 462
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert JWT library to dotnetcore #60
Changes from all commits
d001d7c
87692cf
58b236a
87317a0
8aa7150
13bf119
8da81b4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,5 @@ _ReSharper*/ | |
package/ | ||
packages/ | ||
*.nupkg | ||
.idea | ||
project.lock.json |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"projects":[ "src", "tests" ] | ||
} |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,11 @@ public static class JsonWebToken | |
/// <summary> | ||
/// Pluggable JSON Serializer | ||
/// </summary> | ||
#if !NETSTANDARD1_3 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we should jump 2.0 and make this change for either platforms There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Im assuming you mean BOTH platforms. I will make this change then. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, right |
||
public static IJsonSerializer JsonSerializer = new DefaultJsonSerializer(); | ||
#else | ||
public static IJsonSerializer JsonSerializer = new NewtonsoftJsonSerializer(); | ||
#endif | ||
|
||
private static readonly DateTime UnixEpoch = new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc); | ||
|
||
|
@@ -293,4 +297,4 @@ private static JwtHashAlgorithm GetHashAlgorithm(string algorithm) | |
} | ||
} | ||
} | ||
} | ||
} |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion> | ||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath> | ||
</PropertyGroup> | ||
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" /> | ||
<PropertyGroup Label="Globals"> | ||
<ProjectGuid>ac42b95c-6cf7-4ac8-8baf-91bbad616fbc</ProjectGuid> | ||
<RootNamespace>JWT</RootNamespace> | ||
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath> | ||
<OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<SchemaVersion>2.0</SchemaVersion> | ||
</PropertyGroup> | ||
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" /> | ||
</Project> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#if NETSTANDARD1_3 | ||
|
||
namespace JWT | ||
{ | ||
using Newtonsoft.Json; | ||
|
||
public class NewtonsoftJsonSerializer : IJsonSerializer | ||
{ | ||
public string Serialize(object obj) | ||
{ | ||
return JsonConvert.SerializeObject(obj); | ||
} | ||
|
||
public T Deserialize<T>(string json) | ||
{ | ||
return JsonConvert.DeserializeObject<T>(json); | ||
} | ||
} | ||
} | ||
#endif |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
"version": "1.3.7-beta1", | ||
"title": "JWT", | ||
"description": "JWT (JSON Web Token) implemented for .NET", | ||
"authors": [ | ||
"John Sheehan", | ||
"Michael Lehenbauer", | ||
"Alexander Batishchev", | ||
"Alistair Bush" | ||
], | ||
|
||
"packOptions": { | ||
"projectUrl": "https://github.com/jwt-dotnet/jwt", | ||
"tags": [ | ||
"json", | ||
"jwt" | ||
], | ||
"licenseUrl": "https://github.com/jwt-dotnet/jwt/blob/master/LICENSE.txt", | ||
"repository": { | ||
"type": "git", | ||
"url": "git@github.com:jwt-dotnet/jwt.git" | ||
} | ||
}, | ||
|
||
"dependencies": { | ||
"NETStandard.Library": "1.6.0" | ||
}, | ||
|
||
"frameworks": { | ||
"net35": { | ||
"frameworkAssemblies": { | ||
"System": "", | ||
"System.Core": "", | ||
"System.Web.Extensions": "" | ||
} | ||
}, | ||
"netstandard1.3": { | ||
"dependencies": { | ||
"Newtonsoft.Json": "9.0.1", | ||
"System.Security.Cryptography.Algorithms": "4.2.0" | ||
} | ||
} | ||
}, | ||
|
||
"tooling": { | ||
"defaultNamespace": "JWT" | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you know why it's empty guid now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will have to double check. I updated the solution using project rider so im not 100% confident it is correct. I don't actually have VS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll try to compile in VS2015 once get access to my dev vm