org.apache.shiro.authc.credential
Class PasswordMatcher
java.lang.Object
org.apache.shiro.authc.credential.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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PasswordMatcher
public PasswordMatcher()
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 attemptinfo
- the AuthenticationInfo
stored in the system.
- Returns:
true
if the provided token credentials match the stored account credentials,
false
otherwise.
getSubmittedPassword
protected Object getSubmittedPassword(AuthenticationToken token)
getStoredPassword
protected Object getStoredPassword(AuthenticationInfo storedAccountInfo)
getPasswordService
public PasswordService getPasswordService()
setPasswordService
public void setPasswordService(PasswordService passwordService)
Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.