TokenCredentials Class
- java.
lang. Object - com.
microsoft. bot. restclient. credentials. TokenCredentials
- com.
Implements
public class TokenCredentials
implements ServiceClientCredentials
Token based credentials for use with a REST Service Client.
Constructor Summary
| Constructor | Description |
|---|---|
| TokenCredentials(String withScheme, String withToken) |
Initializes a new instance of the Token |
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 |
getScheme()
Get the authentication scheme. |
| protected java.lang.String |
getToken(Request request)
Get the secure token. |
Methods inherited from java.lang.Object
Constructor Details
TokenCredentials
public TokenCredentials(String withScheme, String withToken)
Initializes a new instance of the TokenCredentials.
Parameters:
Method Details
applyCredentialsFilter
public void applyCredentialsFilter(OkHttpClient.Builder clientBuilder)
Apply the credentials to the HTTP client builder.
Parameters:
getScheme
protected String getScheme()
Get the authentication scheme.
Returns:
getToken
protected String getToken(Request request)
Get the secure token. Override this method to provide a mechanism for acquiring tokens.
Parameters:
Returns: