Class AuthorizationCodeValidator

  • @ThreadSafe
    public class AuthorizationCodeValidator
    extends Object
    Authorisation code validator, using the c_hash ID token claim. Required in the hybrid flow where the authorisation code is returned together with an ID token at the authorisation endpoint.

    Related specifications:

    • OpenID Connect Core 1.0, section
    • Method Detail

      • validate

        public static void validate​(AuthorizationCode code,
                                    com.nimbusds.jose.JWSAlgorithm jwsAlgorithm,
                                    CodeHash codeHash)
                             throws InvalidHashException
        Validates the specified authorisation code.
        code - The authorisation code. Must not be null.
        jwsAlgorithm - The JWS algorithm of the ID token. Must not be null.=
        codeHash - The authorisation code hash, as set in the c_hash ID token claim. Must not be null.
        InvalidHashException - If the authorisation code doesn't match the hash.