Skip to content

Instantly share code, notes, and snippets.

@davidimoore
Last active January 14, 2016 01:33
Show Gist options
  • Select an option

  • Save davidimoore/054bdfef2ed0c7fb2435 to your computer and use it in GitHub Desktop.

Select an option

Save davidimoore/054bdfef2ed0c7fb2435 to your computer and use it in GitHub Desktop.
JWT Breakdown
//header
{
"typ":"JWT",
"alg":""
}
//payload - claims
{
"iss":"http://myapi.com", //reserved claim
"user":"david" //public claim
}
//signature
HMACSHA256(
base64UrlEncode(header), //encoded header
base64UrlEncode(payload), //encoded payload
secret
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment