Class PlainTextPasswordEncoder
- java.lang.Object
-
- de.hybris.platform.persistence.security.PlainTextPasswordEncoder
-
- All Implemented Interfaces:
PasswordEncoder
,java.io.Serializable
public class PlainTextPasswordEncoder extends java.lang.Object implements PasswordEncoder
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PlainTextPasswordEncoder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
check(java.lang.String uid, java.lang.String encoded, java.lang.String plain)
Checks if theencoded
password (from the user, from the database) and theplain
password (from the login screen) matches.java.lang.String
decode(java.lang.String encoded)
Decode the givenencoded
password.java.lang.String
encode(java.lang.String uid, java.lang.String plain)
Returns the encoded password string based on the implementation of this interface and by the givenplain
password.
-
-
-
Method Detail
-
encode
public java.lang.String encode(java.lang.String uid, java.lang.String plain)
Description copied from interface:PasswordEncoder
Returns the encoded password string based on the implementation of this interface and by the givenplain
password. The uid can be used as additional salt (see SaltedMD5PasswordEncoder).- Specified by:
encode
in interfacePasswordEncoder
- Parameters:
uid
- mostly userID, mostly not usedplain
- the plain password- Returns:
- the encoded password
- See Also:
SaltedMD5PasswordEncoder
,PlainTextPasswordEncoder
-
check
public boolean check(java.lang.String uid, java.lang.String encoded, java.lang.String plain)
Description copied from interface:PasswordEncoder
Checks if theencoded
password (from the user, from the database) and theplain
password (from the login screen) matches.- Specified by:
check
in interfacePasswordEncoder
- Parameters:
uid
- mostly the user ID and mostly not used. For MD5 used as salt.encoded
- the encoded passwordplain
- the plain text password- Returns:
true
if they match,false
otherwise.- See Also:
MD5PasswordEncoder
-
decode
public java.lang.String decode(java.lang.String encoded) throws EJBCannotDecodePasswordException
Description copied from interface:PasswordEncoder
Decode the givenencoded
password. Throws exception if this is not possible.- Specified by:
decode
in interfacePasswordEncoder
- Parameters:
encoded
- the encoded password- Returns:
- the decoded password
- Throws:
EJBCannotDecodePasswordException
- if the password cannot be decoded. (MD5 passwords cannot be decoded)- See Also:
MD5PasswordEncoder
-
-