Class PasswordMatcher
- java.lang.Object
-
- org.apache.shiro.authc.credential.PasswordMatcher
-
- All Implemented Interfaces:
CredentialsMatcher
public class PasswordMatcher extends Object implements CredentialsMatcher
ACredentialsMatcherthat employs best-practices comparisons for hashed text passwords. This implementation delegates to an internalPasswordServiceto perform the actual password comparison. This class is essentially a bridge between the generic CredentialsMatcher interface and the more specificPasswordServicecomponent.- Since:
- 1.2
-
-
Constructor Summary
Constructors Constructor Description PasswordMatcher()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleandoCredentialsMatch(AuthenticationToken token, AuthenticationInfo info)Returnstrueif the provided token credentials match the stored account credentials,falseotherwise.PasswordServicegetPasswordService()protected ObjectgetStoredPassword(AuthenticationInfo storedAccountInfo)protected ObjectgetSubmittedPassword(AuthenticationToken token)voidsetPasswordService(PasswordService passwordService)
-
-
-
Method Detail
-
doCredentialsMatch
public boolean doCredentialsMatch(AuthenticationToken token, AuthenticationInfo info)
Description copied from interface:CredentialsMatcherReturnstrueif the provided token credentials match the stored account credentials,falseotherwise.- Specified by:
doCredentialsMatchin interfaceCredentialsMatcher- Parameters:
token- theAuthenticationTokensubmitted during the authentication attemptinfo- theAuthenticationInfostored in the system.- Returns:
trueif the provided token credentials match the stored account credentials,falseotherwise.
-
getSubmittedPassword
protected Object getSubmittedPassword(AuthenticationToken token)
-
getStoredPassword
protected Object getStoredPassword(AuthenticationInfo storedAccountInfo)
-
getPasswordService
public PasswordService getPasswordService()
-
setPasswordService
public void setPasswordService(PasswordService passwordService)
-
-