AuthenticationHandler Class

  • java.lang.Object
    • com.microsoft.graph.httpcore.AuthenticationHandler

Implements

okhttp3.Interceptor

public class AuthenticationHandler
implements okhttp3.Interceptor

Interceptor responsible for injecting the token in the request headers

Field Summary

Modifier and Type Field and Description
protected static final java.lang.String AUTHORIZATION_HEADER

The authorization request header name

protected static final java.lang.String BEARER

The bearer value for the authorization request header, contains a space

final MiddlewareType MIDDLEWARE_TYPE

The current middleware type

Constructor Summary

Constructor Description
AuthenticationHandler(IAuthenticationProvider authProvider)

Initialize a the handler with a authentication provider

Method Summary

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

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

Field Details

AUTHORIZATION_HEADER

protected static final String AUTHORIZATION_HEADER

The authorization request header name

BEARER

protected static final String BEARER

The bearer value for the authorization request header, contains a space

MIDDLEWARE_TYPE

public final MiddlewareType MIDDLEWARE_TYPE

The current middleware type

Constructor Details

AuthenticationHandler

public AuthenticationHandler(IAuthenticationProvider authProvider)

Initialize a the handler with a authentication provider

Parameters:

authProvider - the authentication provider to use

Method Details

intercept

public Response intercept(Interceptor.Chain chain)

Parameters:

chain

Throws:

java.io.IOException

Applies to