Package com.microsoft.rest.credentials
Class BasicAuthenticationCredentials
- java.lang.Object
-
- com.microsoft.rest.credentials.BasicAuthenticationCredentials
-
- All Implemented Interfaces:
ServiceClientCredentials
public class BasicAuthenticationCredentials extends Object implements ServiceClientCredentials
Basic Auth credentials for use with a REST Service Client.
-
-
Constructor Summary
Constructors Constructor Description BasicAuthenticationCredentials(String userName, String password)Instantiates a new basic authentication credential.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapplyCredentialsFilter(okhttp3.OkHttpClient.Builder clientBuilder)Apply the credentials to the HTTP client builder.protected StringgetPassword()StringgetUserName()
-
-
-
Method Detail
-
getUserName
public String getUserName()
- Returns:
- the user name of the credential
-
getPassword
protected String getPassword()
- Returns:
- the password of the credential
-
applyCredentialsFilter
public void applyCredentialsFilter(okhttp3.OkHttpClient.Builder clientBuilder)
Description copied from interface:ServiceClientCredentialsApply the credentials to the HTTP client builder.- Specified by:
applyCredentialsFilterin interfaceServiceClientCredentials- Parameters:
clientBuilder- the builder for building up anOkHttpClient
-
-