Class CodeVerifier

  • All Implemented Interfaces:

    public class CodeVerifier
    extends Secret
    Authorisation code verifier.

    Related specifications:

    • Proof Key for Code Exchange by OAuth Public Clients (RFC 7636).
    See Also:
    Serialized Form
    • Constructor Detail

      • CodeVerifier

        public CodeVerifier​(String value)
        Creates a new code verifier with the specified value.
        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, based on the secrets' SHA-256 hashes.
        equals in class Secret
        object - The other object. May be null.
        true if both objects are equal, else false.