JWT signing and token creation

The algorithm for creating the JWT token is shown here:

HMACSHA512(
base64UrlEncode(header) + "." +
base64UrlEncode(payload), "your-512-bit-secret")

HMACSHA512 is the encryption algorithm that we chose. The header and payload are Base64-encoded, and are separated by a dot (.).

A 512-bit secret (also called a secret key or a private key) is used to encrypt and create the JSON.

The secret is also used when decrypting the token.

You can play with the payload and different JWT signing algorithms on the website: https://jwt.io. The following screenshot shows the interface that is offered:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset