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 |
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.
|
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()
Copyright © 2012. All Rights Reserved.