Interface CredentialsMatcher

All Known Implementing Classes:
AllowAllCredentialsMatcher, HashedCredentialsMatcher, PasswordMatcher, Sha256CredentialsMatcher, Sha384CredentialsMatcher, Sha512CredentialsMatcher, SimpleCredentialsMatcher

public interface CredentialsMatcher
Interface implemented by classes that can determine if an AuthenticationToken's provided credentials matches a corresponding account's credentials stored in the system.

Simple direct comparisons are handled well by the SimpleCredentialsMatcher. If you hash user's credentials before storing them in a realm (a common practice), look at the HashedCredentialsMatcher implementations, as they support this scenario.

Since:
0.1
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns true if the provided token credentials match the stored account credentials, false otherwise.
  • Method Details

    • doCredentialsMatch

      Returns true if the provided token credentials match the stored account credentials, false otherwise.
      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.