com.atlassian.crowd.embedded.api
Class PasswordCredential

java.lang.Object
  extended by com.atlassian.crowd.embedded.api.PasswordCredential
All Implemented Interfaces:
Serializable

public class PasswordCredential
extends Object
implements Serializable

Password based authentication information.

Version:
1.0
Author:
Justen Stepka
See Also:
Serialized Form

Field Summary
protected  String credential
           
static PasswordCredential NONE
           
 
Constructor Summary
PasswordCredential()
          Deprecated. since 1.3.2, please use any other PasswordCredential constructor, this constructor should only be used by hibernate. If this constructor is used, please be aware that you must set setEncryptedCredential(boolean)
PasswordCredential(PasswordCredential passwordCredential)
           
PasswordCredential(String unencryptedCredential)
          Constructor that takes an unencrypted credential.
PasswordCredential(String credential, boolean encryptedCredential)
           
 
Method Summary
static PasswordCredential encrypted(String encryptedCredential)
           
 boolean equals(Object o)
           
 String getCredential()
          Gets the password credential.
 int hashCode()
           
 boolean isEncryptedCredential()
           
 void setCredential(String credential)
          Deprecated. create a new instance rather than mutating.
 void setEncryptedCredential(boolean encryptedCredential)
          Deprecated. create a new instance rather than mutating.
 String toString()
           
static PasswordCredential unencrypted(String unencryptedCredential)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

NONE

public static final PasswordCredential NONE

credential

protected String credential
Constructor Detail

PasswordCredential

public PasswordCredential()
Deprecated. since 1.3.2, please use any other PasswordCredential constructor, this constructor should only be used by hibernate. If this constructor is used, please be aware that you must set setEncryptedCredential(boolean)

Default constructor used by hibernate


PasswordCredential

public PasswordCredential(PasswordCredential passwordCredential)

PasswordCredential

public PasswordCredential(String unencryptedCredential)
Constructor that takes an unencrypted credential. ie encryptedCredential is false.

Parameters:
unencryptedCredential - the unencrypted password credential

PasswordCredential

public PasswordCredential(String credential,
                          boolean encryptedCredential)
Method Detail

encrypted

public static PasswordCredential encrypted(String encryptedCredential)

unencrypted

public static PasswordCredential unencrypted(String unencryptedCredential)

getCredential

public String getCredential()
Gets the password credential.

Returns:
The credential.

setCredential

public void setCredential(String credential)
Deprecated. create a new instance rather than mutating.

Sets the password credential.

Parameters:
credential - The credential.

isEncryptedCredential

public boolean isEncryptedCredential()

setEncryptedCredential

public void setEncryptedCredential(boolean encryptedCredential)
Deprecated. create a new instance rather than mutating.


equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2014 Atlassian. All Rights Reserved.