public class PlainTextPasswordEncoder extends java.lang.Object implements PasswordEncoder
| Constructor and Description |
|---|
PlainTextPasswordEncoder() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
check(java.lang.String uid,
java.lang.String encoded,
java.lang.String plain)
Checks if the
encoded password (from the user, from the database) and the plain password
(from the login screen) matches. |
java.lang.String |
decode(java.lang.String encoded)
Decode the given
encoded 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 given
plain password. |
public java.lang.String encode(java.lang.String uid,
java.lang.String plain)
PasswordEncoderplain password. The uid can be used as additional salt (see SaltedMD5PasswordEncoder).encode in interface PasswordEncoderuid - mostly userID, mostly not usedplain - the plain passwordSaltedMD5PasswordEncoder,
PlainTextPasswordEncoderpublic boolean check(java.lang.String uid,
java.lang.String encoded,
java.lang.String plain)
PasswordEncoderencoded password (from the user, from the database) and the plain password
(from the login screen) matches.check in interface PasswordEncoderuid - mostly the user ID and mostly not used. For MD5 used as salt.encoded - the encoded passwordplain - the plain text passwordtrue if they match, false otherwise.MD5PasswordEncoderpublic java.lang.String decode(java.lang.String encoded)
throws EJBCannotDecodePasswordException
PasswordEncoderencoded password. Throws exception if this is not possible.decode in interface PasswordEncoderencoded - the encoded passwordEJBCannotDecodePasswordException - if the password cannot be decoded. (MD5 passwords cannot be decoded)MD5PasswordEncoderCopyright © 2018 SAP SE. All Rights Reserved.