public class LdapSshaPasswordEncoder extends org.springframework.security.authentication.encoding.LdapShaPasswordEncoder implements LdapPasswordEncoder, InternalPasswordEncoder
LdapShaPasswordEncoder
to specifically add salt to the SSHA
if it has not been providedConstructor and Description |
---|
LdapSshaPasswordEncoder() |
Modifier and Type | Method and Description |
---|---|
String |
encodePassword(String rawPass,
Object salt)
This method delegates to
LdapShaPasswordEncoder.encodePassword(java.lang.String, java.lang.Object) , but if the passed in salt is null
Crowd will use the propertyManager to find the salt used for Token's and pass that along to the underlying implementation |
String |
getKey()
The key to define this password encoder
|
boolean |
isPasswordValid(String encPass,
String rawPass,
Object salt)
Validates a specified "raw" password against an encoded password.
|
public String encodePassword(String rawPass, Object salt)
LdapShaPasswordEncoder.encodePassword(java.lang.String, java.lang.Object)
, but if the passed in salt is null
Crowd will use the propertyManager to find the salt used for Token's and pass that along to the underlying implementationencodePassword
in interface org.springframework.security.authentication.encoding.PasswordEncoder
encodePassword
in class org.springframework.security.authentication.encoding.LdapShaPasswordEncoder
rawPass
- the password to encodesalt
- the salt needs to be of type byte[], if null a random salt value will be usedpublic boolean isPasswordValid(String encPass, String rawPass, Object salt)
PasswordEncoder
Validates 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 the rawPass
(using the optional salt
), and then
compared it with the presented encPass
.
For a discussion of salts, please refer to PasswordEncoder.encodePassword(String, Object)
.
isPasswordValid
in interface org.springframework.security.authentication.encoding.PasswordEncoder
isPasswordValid
in class org.springframework.security.authentication.encoding.LdapShaPasswordEncoder
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. A
null
value is legal.public String getKey()
PasswordEncoder
Copyright © 2017 Atlassian. All rights reserved.