public class ShiroPasswordEncoder extends Object implements PasswordEncoder
PasswordService
from Apache Shiro
Add the shiro-core
dependency to use this class.Constructor and Description |
---|
ShiroPasswordEncoder(org.apache.shiro.authc.credential.PasswordService delegate) |
Modifier and Type | Method and Description |
---|---|
String |
encode(String password)
Encode a password.
|
org.apache.shiro.authc.credential.PasswordService |
getDelegate() |
boolean |
matches(String plainPassword,
String encodedPassword)
Validate if a plainPassword matches
|
void |
setDelegate(org.apache.shiro.authc.credential.PasswordService delegate) |
public ShiroPasswordEncoder(org.apache.shiro.authc.credential.PasswordService delegate)
public String encode(String password)
PasswordEncoder
encode
in interface PasswordEncoder
password
- the not encoded passwordpublic boolean matches(String plainPassword, String encodedPassword)
PasswordEncoder
matches
in interface PasswordEncoder
plainPassword
- the not encoded password to checkencodedPassword
- the encoded passwordtrue
if they matchpublic org.apache.shiro.authc.credential.PasswordService getDelegate()
public void setDelegate(org.apache.shiro.authc.credential.PasswordService delegate)
Copyright © 2018. All rights reserved.