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
ConstructorDescriptionShiroPasswordEncoder
(org.apache.shiro.authc.credential.PasswordService delegate) Constructor for ShiroPasswordEncoder. -
Method Summary
Modifier and TypeMethodDescriptionEncode a password.org.apache.shiro.authc.credential.PasswordService
Getter for the fielddelegate
.boolean
Validate if a plainPassword matchesvoid
setDelegate
(org.apache.shiro.authc.credential.PasswordService delegate) Setter for the fielddelegate
.
-
Constructor Details
-
ShiroPasswordEncoder
public ShiroPasswordEncoder(org.apache.shiro.authc.credential.PasswordService delegate) Constructor for ShiroPasswordEncoder.
- Parameters:
delegate
- aPasswordService
object
-
-
Method Details
-
encode
Encode a password.- Specified by:
encode
in interfacePasswordEncoder
- Parameters:
password
- the not encoded password- Returns:
- the encoded password
-
matches
Validate if a plainPassword matches- Specified by:
matches
in interfacePasswordEncoder
- Parameters:
plainPassword
- the not encoded password to checkencodedPassword
- the encoded password- Returns:
true
if they match
-
getDelegate
public org.apache.shiro.authc.credential.PasswordService getDelegate()Getter for the field
delegate
.- Returns:
- a
PasswordService
object
-
setDelegate
public void setDelegate(org.apache.shiro.authc.credential.PasswordService delegate) Setter for the field
delegate
.- Parameters:
delegate
- aPasswordService
object
-