Class PasswordMatcher
java.lang.Object
org.apache.shiro.authc.credential.PasswordMatcher
- All Implemented Interfaces:
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
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleandoCredentialsMatch(AuthenticationToken token, AuthenticationInfo info) Returnstrueif the provided token credentials match the stored account credentials,falseotherwise.protected ObjectgetStoredPassword(AuthenticationInfo storedAccountInfo) protected ObjectvoidsetPasswordService(PasswordService passwordService)
-
Constructor Details
-
PasswordMatcher
public PasswordMatcher()
-
-
Method Details
-
doCredentialsMatch
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
-
getStoredPassword
-
getPasswordService
-
setPasswordService
-