In the preview 6 for WCF Web API there was a JsonWebToken class that can be used to create and parse Json Web Tokens (JWT). I cannot find that this class was included when WCF Web API was merged and moved into ASP.NET Web API (I checked the latest version)?
The License is a "preview license", and as I understand it, I'm not allowed to use anything from preview 6 other than building a test project (so, a commercial product is not allowed as I understand)?
Am I force to rewrite my own Json Web Token implementation or am I just missing where to find it in the Web API (was it renamed)?
Removed System.Json.dll: Because of the overlap with functionality already in Json.NET the System.Json.dll assembly has been removed.
I don't have the inside knowledege so it's purely a guess, but as the JSON Web Token RFC is still just a draft I don't suppose it will be included as there's no official MS implemenation yet. I expect the Azure SDK would first out of the gate if one is produced.
Thanks! And you're probably right about why they didn't include it since it's only a draft.
My intended use is totally internal (betweeen two separate "disconnected" parts of our product to provide authentication/authorization to a "slave" system) so I don't really need to interop with another vendor, so a draft implementation will work perfectly
for me since I "own" both ends.
I was actually (re)inventing something similiar to JWT when I stumbled upon it and figured it was better to use something that is more or less standardized instead of my own homebrewed token protocol.
I did look at John Sheehans and the Thinktecture project suggested in the other posts but none of them had the same nice-looking API as the WCF Web API Preview 6 had. I'll review all of them and see if I end up using (and extend) one of them or coding my
own implementation from scratch.
Removed System.Json.dll: Because of the overlap with functionality already in Json.NET the System.Json.dll assembly has been removed.
I don't have the inside knowledege so it's purely a guess, but as the JSON Web Token RFC is still just a draft I don't suppose it will be included as there's no official MS implemenation yet. I expect the Azure SDK would first out of the gate if one is produced.
PerG
Member
4 Points
3 Posts
JsonWebToken.cs
Jun 15, 2012 11:25 AM|LINK
In the preview 6 for WCF Web API there was a JsonWebToken class that can be used to create and parse Json Web Tokens (JWT). I cannot find that this class was included when WCF Web API was merged and moved into ASP.NET Web API (I checked the latest version)?
The question is if it's going to be included (probably not since MVC 4 is a RC now)? Or is it possible to use it anyway by including the JsonWebToken.cs from the source provided from the WCF Web API Preview 6 (http://wcf.codeplex.com/SourceControl/changeset/view/66aa503c963c#WCFWebApi/src/Microsoft.Json/System/Json/JsonWebToken.cs)
The License is a "preview license", and as I understand it, I'm not allowed to use anything from preview 6 other than building a test project (so, a commercial product is not allowed as I understand)?
Am I force to rewrite my own Json Web Token implementation or am I just missing where to find it in the Web API (was it renamed)?
james-world
Member
103 Points
50 Posts
Re: JsonWebToken.cs
Jun 15, 2012 12:36 PM|LINK
From the RC release notes at http://forums.asp.net/post/set/1246/1814664/5027371:
Removed System.Json.dll: Because of the overlap with functionality already in Json.NET the System.Json.dll assembly has been removed.
I don't have the inside knowledege so it's purely a guess, but as the JSON Web Token RFC is still just a draft I don't suppose it will be included as there's no official MS implemenation yet. I expect the Azure SDK would first out of the gate if one is produced.
There are some 3rd party options:
https://github.com/johnsheehan/jwt (Nuget: JWT)
http://code.google.com/p/google-api-dotnet-client/
BrockAllen
All-Star
27434 Points
4891 Posts
MVP
Re: JsonWebToken.cs
Jun 15, 2012 01:26 PM|LINK
Here's a JWT implementation:
https://github.com/thinktecture/Thinktecture.IdentityModel.45
Here's the cooresponding blog post:
http://leastprivilege.com/2012/05/25/json-web-token-jwt-support-in-thinktecture-identitymodel/
DevelopMentor | http://www.develop.com
thinktecture | http://www.thinktecture.com/
panesofglass
Member
730 Points
237 Posts
Re: JsonWebToken.cs
Jun 15, 2012 02:18 PM|LINK
Take a look at Thinktecture.IdentityModel. That's an OSS project available via NuGet that has JsonWebToken support.
PerG
Member
4 Points
3 Posts
Re: JsonWebToken.cs
Jun 20, 2012 09:23 PM|LINK
Thanks! And you're probably right about why they didn't include it since it's only a draft.
My intended use is totally internal (betweeen two separate "disconnected" parts of our product to provide authentication/authorization to a "slave" system) so I don't really need to interop with another vendor, so a draft implementation will work perfectly for me since I "own" both ends.
I was actually (re)inventing something similiar to JWT when I stumbled upon it and figured it was better to use something that is more or less standardized instead of my own homebrewed token protocol.
I did look at John Sheehans and the Thinktecture project suggested in the other posts but none of them had the same nice-looking API as the WCF Web API Preview 6 had. I'll review all of them and see if I end up using (and extend) one of them or coding my own implementation from scratch.