Class AbstractJwtReader

    • Constructor Detail

      • AbstractJwtReader

        public AbstractJwtReader​(com.nimbusds.jose.JWSVerifier verifier)
    • 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 qsh claim, verification will still succeed.

        Parameters:
        jwt - the serialized JWT
        queryStringHash - 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 parsed
        JwtVerificationException - if the JWT signature did not match