AppCredentialsInterceptor Class

  • java.lang.Object
    • com.microsoft.bot.connector.authentication.AppCredentialsInterceptor

Implements

okhttp3.Interceptor

public class AppCredentialsInterceptor
implements okhttp3.Interceptor

Token credentials filter for placing a token credential into request headers.

Constructor Summary

Constructor Description
AppCredentialsInterceptor(AppCredentials withCredentials)

Initialize a TokenCredentialsFilter class with a TokenCredentials credential.

Method Summary

Modifier and Type Method and Description
okhttp3.Response intercept(Interceptor.Chain chain)

Apply the credentials to the HTTP request.

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

AppCredentialsInterceptor

public AppCredentialsInterceptor(AppCredentials withCredentials)

Initialize a TokenCredentialsFilter class with a TokenCredentials credential.

Parameters:

withCredentials - a TokenCredentials instance

Method Details

intercept

public Response intercept(Interceptor.Chain chain)

Apply the credentials to the HTTP request.

Parameters:

chain - The Okhttp3 Interceptor Chain.

Returns:

The modified Response.

Throws:

java.io.IOException - via Chain or failure to get token.

Applies to