Package com.microsoft.graph.httpcore
Class AuthenticationHandler
java.lang.Object
com.microsoft.graph.httpcore.AuthenticationHandler
- All Implemented Interfaces:
okhttp3.Interceptor
Interceptor responsible for injecting the token in the request headers
-
Nested Class Summary
Nested classes/interfaces inherited from interface okhttp3.Interceptor
okhttp3.Interceptor.Chain, okhttp3.Interceptor.Companion -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static StringThe authorization request header nameprotected static StringThe bearer value for the authorization request header, contains a spaceThe current middleware typeFields inherited from interface okhttp3.Interceptor
Companion -
Constructor Summary
ConstructorsConstructorDescriptionAuthenticationHandler(IAuthenticationProvider authProvider)Initialize a the handler with a authentication provider -
Method Summary
-
Field Details
-
BEARER
The bearer value for the authorization request header, contains a space- See Also:
- Constant Field Values
-
AUTHORIZATION_HEADER
The authorization request header name- See Also:
- Constant Field Values
-
MIDDLEWARE_TYPE
The current middleware type
-
-
Constructor Details
-
AuthenticationHandler
Initialize a the handler with a authentication provider- Parameters:
authProvider- the authentication provider to use
-
-
Method Details
-
intercept
@Nonnull public okhttp3.Response intercept(@Nonnull okhttp3.Interceptor.Chain chain) throws IOException- Specified by:
interceptin interfaceokhttp3.Interceptor- Throws:
IOException
-