Create JWT
JWT content is compiled by JWTBuilder, which is divided into two parts: JWTHeader and Claims, which are filled separately. Finally, JWT or JWS Token String is obtained according to whether they are encapsulated and signed or not.
Example
Usage
For better understanding, this method is introduced in the JWT module. The DID document offers a method to create JWTBuilder and get the compiled mode of JWT.
This method creates an empty JWTHeader, and the API document can be referred to for adding elements.
This method creates empty claims, and the API document can be referred to for adding elements.
This method fills header into JWTBuilder.
This method fills claims into JWTBuilder.
This method signs the content of JWTBuilder and generates JWT string.
Keyid is the authentication key in the DID document that creates JWTBuilder.
Keyid is the DID document that creates JWTBuilder.
This method encapsulates the content in JWTBuilder and generates JWT string.
Last updated