public class BasicAuthenticationCredentials extends Object implements Credentials
| Modifier and Type | Class and Description |
|---|---|
static interface |
BasicAuthenticationCredentials.Base64Encoder
Represents a Base64Encoder
|
class |
BasicAuthenticationCredentials.InvalidPlatformException |
| Constructor and Description |
|---|
BasicAuthenticationCredentials(String username,
String password,
BasicAuthenticationCredentials.Base64Encoder encoder)
Creates a BasicAuthenticationCredentials instance with a username,
password and an encoder
|
| Modifier and Type | Method and Description |
|---|---|
String |
getPassword()
Returns the password for the credentials
|
String |
getUsername()
Returns the username for the credentials
|
void |
prepareRequest(Request request)
Adds the credentials to the request
|
void |
setPassword(String password)
Sets the password for the credentials
|
void |
setUsername(String username)
Sets the username for the credentials
|
public BasicAuthenticationCredentials(String username, String password, BasicAuthenticationCredentials.Base64Encoder encoder)
username - The username for the credentialspassword - The password for the credentialsencoder - The Base64 encoder to usepublic String getUsername()
public void setUsername(String username)
username - username to setpublic String getPassword()
public void setPassword(String password)
password - password for the credentialspublic void prepareRequest(Request request)
CredentialsprepareRequest in interface Credentialsrequest - The request to prepareCopyright © 2019. All rights reserved.