public class PasswordMatcher extends Object implements CredentialsMatcher
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.| Constructor and Description |
|---|
PasswordMatcher() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
doCredentialsMatch(AuthenticationToken token,
AuthenticationInfo info)
Returns
true if the provided token credentials match the stored account credentials,
false otherwise. |
PasswordService |
getPasswordService() |
protected Object |
getStoredPassword(AuthenticationInfo storedAccountInfo) |
protected Object |
getSubmittedPassword(AuthenticationToken token) |
void |
setPasswordService(PasswordService passwordService) |
public boolean doCredentialsMatch(AuthenticationToken token, AuthenticationInfo info)
CredentialsMatchertrue if the provided token credentials match the stored account credentials,
false otherwise.doCredentialsMatch in interface CredentialsMatchertoken - the AuthenticationToken submitted during the authentication attemptinfo - the AuthenticationInfo stored in the system.true if the provided token credentials match the stored account credentials,
false otherwise.protected Object getSubmittedPassword(AuthenticationToken token)
protected Object getStoredPassword(AuthenticationInfo storedAccountInfo)
public PasswordService getPasswordService()
public void setPasswordService(PasswordService passwordService)
Copyright © 2004-2016 The Apache Software Foundation. All Rights Reserved.