Package web5.sdk.jose.jwt
Object Jwt
-
- All Implemented Interfaces:
public class JwtJson Web Token (JWT) is a compact, URL-safe means of representing claims to be transferred between two parties. Spec: https://datatracker.ietf.org/doc/html/rfc7519
-
-
Method Summary
Modifier and Type Method Description final DecodedJwtdecode(String jwt)Decode a JWT into its parts. final Stringsign(BearerDid did, JwtClaimsSet payload)Sign a JwtClaimsSet using a Bearer DID. final DecodedJwtverify(String jwt)Verify a JWT. -
-
Method Detail
-
decode
final DecodedJwt decode(String jwt)
Decode a JWT into its parts.
- Parameters:
jwt- The JWT string to decode- Returns:
DecodedJwt
-
sign
final String sign(BearerDid did, JwtClaimsSet payload)
Sign a JwtClaimsSet using a Bearer DID.
- Parameters:
did- The Bearer DID to sign withpayload- The JwtClaimsSet payload to sign- Returns:
The signed JWT
-
verify
final DecodedJwt verify(String jwt)
Verify a JWT.
- Parameters:
jwt- The JWT to verify- Returns:
DecodedJwt
-
-
-
-