addAuthorizationHeader

open fun addAuthorizationHeader(builder: Request.Builder, authToken: String): Request.Builder

Adds the authorization header to request builder.

Parameters

builder

Builder instance.

authToken

Access token.


open fun addAuthorizationHeader(builder: Request.Builder, authToken: String, @Nullable tokenType: String): Request.Builder

Adds the authorization header to the request builder, choosing the scheme based on the token type. When tokenType equals "DPoP", the DPoP scheme is used; otherwise Bearer is used.

Parameters

builder

Builder instance.

authToken

Access token.

tokenType

Token type (e.g. "Bearer" or "DPoP"), or null for default Bearer.