Skip to content

Instantly share code, notes, and snippets.

@jazlalli
Last active December 11, 2015 12:58
Show Gist options
  • Save jazlalli/4604200 to your computer and use it in GitHub Desktop.
Save jazlalli/4604200 to your computer and use it in GitHub Desktop.
JWT header
// jwt header
var header = new { typ = "JWT", alg = "RS256" };
// encoding
var headerBytes = Encoding.UTF8.GetBytes(_jsonProvider.Serialize(header));
var headerEncoded = _base64Encoder.ToBase64UrlEncodedString(headerBytes);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment