REST API

Retrieve the Public Key ID

A JSON Web Token includes three sections, separated by a period (.):
  • Header
  • Payload
  • Signature
in the format:
header.payload.signature
.
The
kid
parameter within the JWT header is the public key ID. You use this ID to request the public key using the
/flex/v2/public-keys/[kid]
endpoint.

Decrypt the JWT Header

The JWT token is base64 encoded. You will need to decrypt the token before you can see the
kid
parameter.
Sample Header
eyJraWQiOiJ6dSIsImFsZyI6IlJTMjU2In0K
Example: Decrypting Header on the Command Line
echo 'eyJraWQiOiJ6dSIsImFsZyI6IlJTMjU2In0K' | base64 --decode
Sample Output
{"kid":"zu","alg":"RS256"}