Class PasswordMatcher

  • All Implemented Interfaces:
    CredentialsMatcher

    public class PasswordMatcher
    extends Object
    implements CredentialsMatcher
    A CredentialsMatcher that employs best-practices comparisons for hashed text passwords.

    This implementation delegates to an internal PasswordService to perform the actual password comparison. This class is essentially a bridge between the generic CredentialsMatcher interface and the more specific PasswordService component.
    Since:
    1.2
    • Constructor Detail

      • PasswordMatcher

        public PasswordMatcher()
    • Method Detail

      • doCredentialsMatch

        public boolean doCredentialsMatch(AuthenticationToken token,
                                          AuthenticationInfo info)
        Description copied from interface: CredentialsMatcher
        Returns true if the provided token credentials match the stored account credentials, false otherwise.
        Specified by:
        doCredentialsMatch in interface CredentialsMatcher
        Parameters:
        token - the AuthenticationToken submitted during the authentication attempt
        info - the AuthenticationInfo stored in the system.
        Returns:
        true if the provided token credentials match the stored account credentials, false otherwise.
      • setPasswordService

        public void setPasswordService(PasswordService passwordService)