Class LdapSshaPasswordEncoder
java.lang.Object
com.atlassian.crowd.password.encoder.LdapSshaPasswordEncoder
- All Implemented Interfaces:
InternalPasswordEncoder,LdapPasswordEncoder,PasswordEncoder
public class LdapSshaPasswordEncoder
extends Object
implements LdapPasswordEncoder, InternalPasswordEncoder
This class uses the
LdapShaPasswordEncoder to specifically add
salt to the SSHA if it has not been provided.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionencodePassword(String rawPass, Object salt) This method delegates toLdapShaPasswordEncoder.encode(CharSequence)getKey()The key to define this password encoderbooleanisPasswordValid(String encPass, String rawPass, Object salt) Validates a specified "raw" password against an encoded password.
-
Constructor Details
-
LdapSshaPasswordEncoder
public LdapSshaPasswordEncoder()
-
-
Method Details
-
encodePassword
This method delegates toLdapShaPasswordEncoder.encode(CharSequence)- Specified by:
encodePasswordin interfacePasswordEncoder- Parameters:
rawPass- the password to encodesalt- not used in this implementation- Returns:
- String the encoded password
-
isPasswordValid
Description copied from interface:PasswordEncoderValidates a specified "raw" password against an encoded password.
The encoded password should have previously been generated by
PasswordEncoder.encodePassword(String, Object). This method will encode therawPass(using the optionalsalt), and then compared it with the presentedencPass.For a discussion of salts, please refer to
PasswordEncoder.encodePassword(String, Object).- Specified by:
isPasswordValidin interfacePasswordEncoder- Parameters:
encPass- a pre-encoded passwordrawPass- a raw password to encode and compare against the pre-encoded passwordsalt- optionally used by the implementation to "salt" the raw password before encoding. Anullvalue is legal.- Returns:
- true if the password is valid , false otherwise
-
getKey
Description copied from interface:PasswordEncoderThe key to define this password encoder- Specified by:
getKeyin interfacePasswordEncoder
-