Class AuthorizationHandler

java.lang.Object
com.microsoft.kiota.http.middleware.AuthorizationHandler
All Implemented Interfaces:
okhttp3.Interceptor

public class AuthorizationHandler extends Object implements okhttp3.Interceptor
This interceptor is responsible for adding the Authorization header to the request if the header is not already present. It also handles Continuous Access Evaluation (CAE) claims challenges if the token request was made using this interceptor. It does this using the provided AuthenticationProvider
  • Nested Class Summary

    Nested classes/interfaces inherited from interface okhttp3.Interceptor

    okhttp3.Interceptor.Chain, okhttp3.Interceptor.Companion
  • Field Summary

    Fields inherited from interface okhttp3.Interceptor

    Companion
  • Constructor Summary

    Constructors
    Constructor
    Description
    AuthorizationHandler(com.microsoft.kiota.authentication.BaseBearerTokenAuthenticationProvider authenticationProvider)
    Instantiates a new AuthorizationHandler.
  • Method Summary

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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AuthorizationHandler

      public AuthorizationHandler(@Nonnull com.microsoft.kiota.authentication.BaseBearerTokenAuthenticationProvider authenticationProvider)
      Instantiates a new AuthorizationHandler.
      Parameters:
      authenticationProvider - the authentication provider.
  • Method Details

    • intercept

      @Nonnull public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException
      Specified by:
      intercept in interface okhttp3.Interceptor
      Throws:
      IOException