BearerTokenAuth

Fixed bearer token. Suitable for app-password sessions or service tokens.

Constructors

Link copied to clipboard
constructor(token: String)

Functions

Link copied to clipboard
open suspend override fun authHeaders(method: String, url: String): Map<String, String>

Returns the HTTP headers to attach to an XRPC request.

Link copied to clipboard
open suspend fun onUnauthorized(responseHeaders: Map<String, String>): Boolean

Called by XrpcClient when a request returns HTTP 401. The provider can inspect the response headers (e.g. DPoP-Nonce) and update its internal state for a retry.