java.lang.Object
org.a2aproject.sdk.client.transport.spi.interceptors.ClientCallInterceptor
org.a2aproject.sdk.client.transport.spi.interceptors.auth.AuthInterceptor

public class AuthInterceptor extends ClientCallInterceptor
An interceptor that automatically adds authentication details to requests based on the agent's security schemes and the credentials available.
  • Field Details

  • Constructor Details

  • Method Details

    • intercept

      public PayloadAndHeaders intercept(String methodName, @Nullable Object payload, Map<String,String> headers, @Nullable org.a2aproject.sdk.spec.AgentCard agentCard, @Nullable ClientCallContext clientCallContext)
      Description copied from class: ClientCallInterceptor
      Intercept a client call before the request is sent.
      Specified by:
      intercept in class ClientCallInterceptor
      Parameters:
      methodName - the name of the protocol method (e.g., 'message/send')
      payload - the request payload
      headers - the headers to use
      agentCard - the agent card (may be null)
      clientCallContext - the ClientCallContext for this call (may be null)
      Returns:
      the potentially modified payload and headers