Verify and Use JWT
Upon receiving the JWT, the verifier needs to validate it. The JWT can be verified in the following two ways.
Validate whether the JWT is a valid token of a valid DID signature (generic validation)
Validate whether the JWT is a valid token of a specified DID signature (specified validation)
Generic Validation
Under such circumstances, the JWT parser will resolve the signer in the JWT and try verifying the JWT based on the signer’s DID after resolving its DID.
Specified Validation
In this case, this token is assumed to have a specified DID signature. If the signed DID of JWT is inconsistent with the signer’s DID, the verification will fail.
Read JWT Information
After resolving and validating the token, Swift SDK will return a JWT object through the interface of which the attributes and data encapsulated in the JWT can be accessed. For example:
Last updated