|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.crowd.password.encoder.AtlassianSecurityPasswordEncoder
public class AtlassianSecurityPasswordEncoder
This class is responsible for encoding and validating passwords using Atlassian Password Encoder from Atlassian Security project, while also validating passwords encoded in Atlassian SHA1 format in order to be backwards compatible.
Constructor Summary | |
---|---|
AtlassianSecurityPasswordEncoder()
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AtlassianSecurityPasswordEncoder()
Method Detail |
---|
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
DefaultPasswordEncoder
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 password
public String getKey()
PasswordEncoder
getKey
in interface PasswordEncoder
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |