Class CodeVerifier


  • public class CodeVerifier
    extends Secret
    Authorisation code verifier.

    Related specifications:

    • Proof Key for Code Exchange by OAuth Public Clients (RFC 7636).
    • Constructor Detail

      • CodeVerifier

        public CodeVerifier​(String value)
        Creates a new code verifier with the specified value.
        Parameters:
        value - The code verifier value. Must not contain characters other than [A-Z] / [a-z] / [0-9] / "-" / "." / "_" / "~". The verifier length must be at least 43 characters but not more than 128 characters. Must not be null or empty string.
      • CodeVerifier

        public CodeVerifier()
        Generates a new code verifier represented by a secure random 256-bit number that is Base64URL-encoded (as a 43 character string, which is the minimum character length of a code verifier).
    • Method Detail

      • equals

        public boolean equals​(Object object)
        Description copied from class: Secret
        Comparison with another secret is constant time.
        Overrides:
        equals in class Secret
        Parameters:
        object - The other object. May be null.
        Returns:
        true if both objects are equal, else false.