public class AtlassianSecurityPasswordEncoder extends Object implements InternalPasswordEncoder, UpgradeablePasswordEncoder
| Constructor and Description |
|---|
AtlassianSecurityPasswordEncoder() |
| Modifier and Type | Method and Description |
|---|---|
String |
encodePassword(String rawPass,
Object salt)
Encodes the provided rawPass using a Atlassian Password Encoder from Atlassian Security project.
|
String |
getKey()
The key to define this password encoder
|
boolean |
isPasswordValid(String encPass,
String rawPass,
Object salt)
Returns true if the rawPass is the same password that was used to create encPass.
|
boolean |
isUpgradeRequired(String encPass)
Returns true if the the password is encoded using an older scheme, and if it should be re-encoded and updated.
|
public String encodePassword(String rawPass, Object salt) throws PasswordEncoderException
encodePassword in interface PasswordEncoderrawPass - the password to encodesalt - not used. A null value is legal.PasswordEncoderException - if there were any issues trying to encode a passwordDefaultPasswordEncoderpublic boolean isPasswordValid(String encPass, String rawPass, Object salt)
isPasswordValid in interface PasswordEncoderencPass - a pre-encoded password in either Atlassian SHA1 form or the form provided by DefaultPasswordEncoder.getDefaultInstance() from atlassian-password-encoder.rawPass - a raw password to encode and compare against the pre-encoded passwordsalt - not used. A null value is legal.public boolean isUpgradeRequired(String encPass)
isUpgradeRequired in interface UpgradeablePasswordEncoderencPass - a pre-encoded passwordpublic String getKey()
PasswordEncodergetKey in interface PasswordEncoderCopyright © 2022 Atlassian. All rights reserved.