https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4
https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-5
see also https://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-40#section-3.1