Interface PasswordVerifier


  • public interface PasswordVerifier
    Verifies password against user / authentication PasswordStorageSchemes.
    • Method Detail

      • getPasswordVerifier

        static PasswordVerifier getPasswordVerifier​(boolean isAuthPasswordSyntax)
        Returns the user or authentication password verifier.
        Parameters:
        isAuthPasswordSyntax - if true, returns the authentication password verifier, if false, returns the user password verifier.
        Returns:
        the user or authentication password verifier
      • passwordMatches

        boolean passwordMatches​(ByteSequence plaintextPassword,
                                String encodedPassword)
                         throws DecodeException
        Indicates whether the provided plaintext password matches the encoded password.
        Parameters:
        plaintextPassword - The plaintext password provided by the user.
        encodedPassword - The encoded password to verify against.
        Returns:
        true if the provided plaintext password matches the encoded password, false otherwise
        Throws:
        DecodeException - when the encoded password cannot be decoded
      • userPasswordMatches

        static boolean userPasswordMatches​(ByteSequence plaintextPassword,
                                           String encodedPassword)
                                    throws DecodeException
        Indicates whether the provided plaintext password matches the encoded password using the user password syntax.
        Parameters:
        plaintextPassword - The plaintext password provided by the user.
        encodedPassword - The encoded password to verify against.
        Returns:
        true if the provided plaintext password matches the encoded password, or false if it does not or this storage scheme does not support the user password syntax.
        Throws:
        DecodeException - when the encoded password cannot be decoded
      • userPasswordMatches

        static boolean userPasswordMatches​(PasswordStorageScheme<?> scheme,
                                           ByteSequence plaintextPassword,
                                           UserPassword password)
        Indicates whether the provided plaintext password matches the encoded password using the user password syntax.
        Parameters:
        scheme - The password storage scheme
        plaintextPassword - The plaintext password provided by the user.
        password - The user password to verify.
        Returns:
        true if the provided plaintext password matches the encoded password, or false if it does not or this storage scheme does not support the authentication password syntax.
      • authPasswordMatches

        static boolean authPasswordMatches​(ByteSequence plaintextPassword,
                                           String encodedPassword)
                                    throws DecodeException
        Indicates whether the provided plaintext password matches the encoded password using the authentication password syntax.
        Parameters:
        plaintextPassword - The plaintext password provided by the user.
        encodedPassword - The encoded password to verify.
        Returns:
        true if the provided plaintext password matches the encoded password, or false if it does not or this storage scheme does not support the authentication password syntax.
        Throws:
        DecodeException - when the encoded password cannot be decoded
      • authPasswordMatches

        static boolean authPasswordMatches​(PasswordStorageScheme<?> scheme,
                                           ByteSequence plaintextPassword,
                                           AuthPassword password)
        Indicates whether the provided plaintext password matches the encoded password using the authentication password syntax.
        Parameters:
        scheme - The password storage scheme
        plaintextPassword - The plaintext password provided by the user.
        password - The authentication password to verify.
        Returns:
        true if the provided plaintext password matches the encoded password, or false if it does not or this storage scheme does not support the authentication password syntax.