Class PasswordMatcher
- java.lang.Object
-
- org.apache.shiro.authc.credential.PasswordMatcher
-
- All Implemented Interfaces:
CredentialsMatcher
public class PasswordMatcher extends Object implements CredentialsMatcher
ACredentialsMatcher
that employs best-practices comparisons for hashed text passwords. This implementation delegates to an internalPasswordService
to perform the actual password comparison. This class is essentially a bridge between the generic CredentialsMatcher interface and the more specificPasswordService
component.- Since:
- 1.2
-
-
Constructor Summary
Constructors Constructor Description PasswordMatcher()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
doCredentialsMatch(AuthenticationToken token, AuthenticationInfo info)
Returnstrue
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)
-
-
-
Method Detail
-
doCredentialsMatch
public boolean doCredentialsMatch(AuthenticationToken token, AuthenticationInfo info)
Description copied from interface:CredentialsMatcher
Returnstrue
if the provided token credentials match the stored account credentials,false
otherwise.- Specified by:
doCredentialsMatch
in interfaceCredentialsMatcher
- Parameters:
token
- theAuthenticationToken
submitted during the authentication attemptinfo
- theAuthenticationInfo
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)
-
-