JWT-WebAPI-Example
Authentication in webAPI using JWT token signed using RSA keys
- Quiet · last change 6-17-2015
- ★ 1 on GitHub
README
JWT-WebAPI-Example
The example shows how we can use JWT token for authentication in webapi.To get more information on JWT please read https://en.wikipedia.org/wiki/JSON_Web_Token
Example to generate JWT token-
var utcNow = DateTime.UtcNow;
var expireTime = utcNow.Add(XmlConvert.ToTimeSpan("PT5M"));
var signingCredentials = GetCredentials();
var token = new JwtSecurityToken(issuer, auidenceToken, null, utcNow, expireTime, signingCredentials);
