public class UserCredentials extends Object
Modifier and Type | Field and Description |
---|---|
static UserCredentials |
NO_CREDENTIALS |
Constructor and Description |
---|
UserCredentials(String username,
String password)
Creates a new
UserCredentials instance from the given username and password. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
String |
getObfuscatedPassword()
Returns the password in obfuscated fashion which means everthing except the first and last character replaced by
stars.
|
String |
getPassword()
Get the password to use for authentication.
|
String |
getUsername()
Get the username to use for authentication.
|
int |
hashCode() |
boolean |
hasPassword()
Returns whether the credentials contain a password.
|
boolean |
hasUsername()
Returns whether the credentials contain a username.
|
String |
toString() |
public static final UserCredentials NO_CREDENTIALS
public UserCredentials(String username, String password)
UserCredentials
instance from the given username and password. Empty String
s provided
will be treated like no username or password set.username
- password
- public String getUsername()
public String getPassword()
public boolean hasUsername()
public boolean hasPassword()
public String getObfuscatedPassword()
Copyright © 2011-2014-2014 Pivotal. All Rights Reserved.