Class AuthInterceptor

java.lang.Object
com.alibaba.dashscope.transport.AuthInterceptor
All Implemented Interfaces:
okhttp3.Interceptor

public final class AuthInterceptor extends Object implements okhttp3.Interceptor
Attaches Authorization and X-DashScope-WorkSpace from the per-request auth tag. Headers already set on the request (RequestOptions custom headers) win — they are documented as "applied last, may override SDK-set headers".
  • Nested Class Summary

    Nested classes/interfaces inherited from interface okhttp3.Interceptor

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

    Fields
    Modifier and Type
    Field
    Description
    static final String
     

    Fields inherited from interface okhttp3.Interceptor

    Companion
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • 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
  • Field Details

  • Constructor Details

    • AuthInterceptor

      public AuthInterceptor()
  • Method Details

    • intercept

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