Verify and Use JWT
The SDK provides a method to analyze the type of JWToken (JWT/JWS). If JWS does the corresponding post-verification parsing, both JWT and JWS token string will convert JWT.
JWT provides a multitude of methods to obtain JWT elements for the usage and reference of users.
Example
Usage
This method is provided by the DID document to obtain the JWTParserBuilder object. JWTParserBuilder enables users to set the filter options to check whether the token meets the requirements or not. The interfaces include requireSubject, requireAudience, requireIssuer, requireIssuedAt, requireAlgorithms, requireHeaderType, and setAllowedClockSkewSeconds. Refer to the API document for specifics.
This method is provided by JWTParserBuilder to encapsulate JWTParser.
This method is provided by JWTParser to parse the token. If succeeds, return JWT object; otherwise, an error is returned.
This method is offered by JWT to get the content of JWT header.
This method is provided by JWT to get the content of JWT header body.
Last updated