public class LdapSshaPasswordEncoder extends Object implements LdapPasswordEncoder, InternalPasswordEncoder
LdapShaPasswordEncoder
to specifically add
salt to the SSHA if it has not been provided.Constructor and Description |
---|
LdapSshaPasswordEncoder() |
Modifier and Type | Method and Description |
---|---|
String |
encodePassword(String rawPass,
Object salt)
This method delegates to
LdapShaPasswordEncoder.encode(CharSequence) |
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.encode(CharSequence)
encodePassword
in interface PasswordEncoder
rawPass
- the password to encodesalt
- not used in this implementationpublic 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 PasswordEncoder
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
getKey
in interface PasswordEncoder
Copyright © 2021 Atlassian. All rights reserved.