BasicAuthenticationCredentials Class

  • java.lang.Object
    • com.microsoft.bot.restclient.credentials.BasicAuthenticationCredentials

Implements

public class BasicAuthenticationCredentials
implements ServiceClientCredentials

Basic Auth credentials for use with a REST Service Client.

Constructor Summary

Constructor Description
BasicAuthenticationCredentials(String withUserName, String withPassword)

Instantiates a new basic authentication credential.

Method Summary

Modifier and Type Method and Description
void applyCredentialsFilter(OkHttpClient.Builder clientBuilder)

Apply the credentials to the HTTP client builder.

protected java.lang.String getPassword()
java.lang.String getUserName()

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Constructor Details

BasicAuthenticationCredentials

public BasicAuthenticationCredentials(String withUserName, String withPassword)

Instantiates a new basic authentication credential.

Parameters:

withUserName - basic auth user name
withPassword - basic auth password

Method Details

applyCredentialsFilter

public void applyCredentialsFilter(OkHttpClient.Builder clientBuilder)

Apply the credentials to the HTTP client builder.

Parameters:

clientBuilder - the builder for building up an OkHttpClient

getPassword

protected String getPassword()

Returns:

the password of the credential

getUserName

public String getUserName()

Returns:

the user name of the credential

Applies to