Class ShiroPasswordEncoder
java.lang.Object
org.pac4j.core.credentials.password.ShiroPasswordEncoder
- All Implemented Interfaces:
PasswordEncoder
A password encoder based on
PasswordService from Apache Shiro
Add the shiro-core dependency to use this class.- Since:
- 1.9.2
- Author:
- Victor Noël
-
Constructor Summary
ConstructorsConstructorDescriptionShiroPasswordEncoder(org.apache.shiro.authc.credential.PasswordService delegate) -
Method Summary
Modifier and TypeMethodDescriptionEncode a password.org.apache.shiro.authc.credential.PasswordServicebooleanValidate if a plainPassword matchesvoidsetDelegate(org.apache.shiro.authc.credential.PasswordService delegate)
-
Constructor Details
-
ShiroPasswordEncoder
public ShiroPasswordEncoder(org.apache.shiro.authc.credential.PasswordService delegate)
-
-
Method Details
-
encode
Description copied from interface:PasswordEncoderEncode a password.- Specified by:
encodein interfacePasswordEncoder- Parameters:
password- the not encoded password- Returns:
- the encoded password
-
matches
Description copied from interface:PasswordEncoderValidate if a plainPassword matches- Specified by:
matchesin interfacePasswordEncoder- Parameters:
plainPassword- the not encoded password to checkencodedPassword- the encoded password- Returns:
trueif they match
-
getDelegate
public org.apache.shiro.authc.credential.PasswordService getDelegate() -
setDelegate
public void setDelegate(org.apache.shiro.authc.credential.PasswordService delegate)
-