Class AbstractJwtReader
- java.lang.Object
-
- com.atlassian.connect.spring.internal.jwt.AbstractJwtReader
-
- Direct Known Subclasses:
RsaJwtReader,SymmetricJwtReader
public abstract class AbstractJwtReader extends Object
-
-
Constructor Summary
Constructors Constructor Description AbstractJwtReader(com.nimbusds.jose.JWSVerifier verifier)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract com.nimbusds.jose.AlgorithmgetSupportedAlgorithm()com.nimbusds.jwt.JWTClaimsSetreadAndVerify(String jwt, String queryStringHash)Reads and verifies the given JWT.
-
-
-
Method Detail
-
getSupportedAlgorithm
protected abstract com.nimbusds.jose.Algorithm getSupportedAlgorithm()
-
readAndVerify
public com.nimbusds.jwt.JWTClaimsSet readAndVerify(String jwt, String queryStringHash) throws JwtParseException, JwtVerificationException
Reads and verifies the given JWT.NOTE: If the JWT does not include the
qshclaim, verification will still succeed.- Parameters:
jwt- the serialized JWTqueryStringHash- the expected query-string hash- Returns:
- the claims of the JWT, if it could be successfully parsed and verified
- Throws:
JwtParseException- if the JWT could not be successfully parsedJwtVerificationException- if the JWT signature did not match
-
-