Research into JWT.
How to encode and decode the header and payload.
How to use a syncronous key for the signature.
How to use an asynchronous public/privte keypair for the signature.
https://jwt.io/introduction
https://jwt.io/#debugger-io
https://wstutorial.com/misc/jwt-java-public-key-rsa.html
https://sorenpoulsen.com/calculate-hmac-sha256-with-java
https://en.wikipedia.org/wiki/HMAC
https://en.wikipedia.org/wiki/Cryptographic_hash_function
https://en.wikipedia.org/wiki/Hash_function