Package 

Object StreamOkHttpInterceptors

    • Method Detail

      • auth

         final Interceptor auth(String authType, StreamTokenManager tokenManager, StreamJsonSerialization jsonParser)

        Creates an OkHttp interceptor that adds authentication headers and retries on token errors.

        Parameters:
        authType - The value set on the stream-auth-type header (e.g., "jwt").
        tokenManager - Provides, invalidates, and refreshes tokens.
        jsonParser - JSON parser used to decode error payloads when requests fail.
      • connectionId

         final Interceptor connectionId(StreamConnectionIdHolder connectionIdHolder)

        Creates an OkHttp interceptor that adds a connection_id query parameter to the request URL.

        Parameters:
        connectionIdHolder - The holder that provides the connection ID.
      • clientInfo

         final Interceptor clientInfo(StreamHttpClientInfoHeader clientInfoHeader)

        Creates an OkHttp interceptor that adds the client info header to the request.

        Parameters:
        clientInfoHeader - The client info header to add.
      • apiKey

         final Interceptor apiKey(StreamApiKey apiKey)

        Creates an OkHttp interceptor that adds the Stream API key to the request as a query parameter.

        Parameters:
        apiKey - The API key to add.