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 PasswordEncoder
rawPass
- the password to encodesalt
- not used. A null
value is legal.PasswordEncoderException
- if there were any issues trying to encode a passwordDefaultPasswordEncoder
public boolean isPasswordValid(String encPass, String rawPass, Object salt)
isPasswordValid
in interface PasswordEncoder
encPass
- 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 UpgradeablePasswordEncoder
encPass
- a pre-encoded passwordpublic String getKey()
PasswordEncoder
getKey
in interface PasswordEncoder
Copyright © 2021 Atlassian. All rights reserved.