|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.user.security.password.Credential
public final class Credential
Represents a user's password. Allows the same methods to take both encrypted and unencrypted credentials.
| Field Summary | |
|---|---|
static Credential |
NONE
The null or empty credential, which is encrypted and has an invalid hash so it can never be authenticated against. |
| Method Summary | |
|---|---|
static Credential |
encrypted(java.lang.String hash)
|
boolean |
equals(java.lang.Object o)
|
java.lang.String |
getValue()
Returns the password, either in plain text if isEncrypted() returns false, or as a SHA1-512
hash if isEncrypted() returns true. |
int |
hashCode()
|
boolean |
isEncrypted()
Returns true if the string returned by getValue() is an encrypted hash of the password,
rather than the plaintext password itself. |
static Credential |
unencrypted(java.lang.String password)
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final Credential NONE
| Method Detail |
|---|
public static Credential encrypted(java.lang.String hash)
public static Credential unencrypted(java.lang.String password)
public boolean isEncrypted()
true if the string returned by getValue() is an encrypted hash of the password,
rather than the plaintext password itself.
public java.lang.String getValue()
isEncrypted() returns false, or as a SHA1-512
hash if isEncrypted() returns true.
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||