public class AtlassianSHA1PasswordEncoder extends Object implements InternalPasswordEncoder
Note: the password String is converted to bytes using the platform encoding, to preserve the same behaviour as OSUser.
| Modifier and Type | Field and Description |
|---|---|
static String |
ATLASSIAN_SHA1_KEY |
| Constructor and Description |
|---|
AtlassianSHA1PasswordEncoder() |
| Modifier and Type | Method and Description |
|---|---|
String |
encodePassword(String password,
Object salt)
This method will handle the hashing of the passed in
password param |
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 static final String ATLASSIAN_SHA1_KEY
public String encodePassword(String password, Object salt)
password paramencodePassword in interface PasswordEncoderpassword - the password to encryptsalt - can be null, and is not currently used by the underlying implementationpublic boolean isPasswordValid(String encPass, String rawPass, Object salt)
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 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 PasswordEncoderencPass - 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.org.springframework.security.providers.encoding.PasswordEncoder#isPasswordValid(String, String, Object)public String getKey()
PasswordEncodergetKey in interface PasswordEncoderCopyright © 2023 Atlassian. All rights reserved.