public interface JwtReader
Jwts attached to incoming requests.| Modifier and Type | Method and Description |
|---|---|
Jwt |
read(String jwt,
Map<String,? extends JwtClaimVerifier> requiredClaims)
Deprecated.
|
Jwt |
readAndVerify(String jwt,
Map<String,? extends JwtClaimVerifier> requiredClaims)
|
Jwt |
readUnverified(String jwt)
|
@Nonnull Jwt readUnverified(@Nonnull String jwt) throws JwtParseException, JwtVerificationException
String and on success returns the decoded Jwt.
Does not attempt signature verification. (Useful if e.g. you need to know something from the JWT in order to determine the key.)jwt - a JSON Web Token, (see example)JwtJwtParseException - if the JWT string was malformedJwtVerificationException@Nonnull Jwt readAndVerify(@Nonnull String jwt, @Nonnull Map<String,? extends JwtClaimVerifier> requiredClaims) throws JwtParseException, JwtVerificationException
String, verifies its signature (if there is one) and on success returns the decoded Jwt.jwt - a JSON Web Token, (see example)requiredClaims - claims that must be present, the specified valuesJwtJwtParseException - if the JWT string was malformedJwtVerificationException - if the JWT string was well-formed but failed verification@Deprecated @Nonnull Jwt read(@Nonnull String jwt, @Nonnull Map<String,? extends JwtClaimVerifier> requiredClaims) throws JwtParseException, JwtVerificationException
String, verifies its signature (if there is one) and on success returns the decoded Jwt.
Deprecated because verification is not actually required in order to read the contents of a JWT.
Use readAndVerify(String, java.util.Map) or readUnverified(String) instead.jwt - a JSON Web Token, (see example)requiredClaims - claims that must be present, the specified valuesJwtJwtParseException - if the JWT string was malformedJwtVerificationException - if the JWT string was well-formed but failed verificationCopyright © 2023 Atlassian. All rights reserved.