module documentation

Authorization interfaces used by the async SDK.

This module defines two abstract interfaces used by the SDK to perform request-time authorization.

Typical usage within the request lifecycle

Give a Provider to the request constructor. Before it sends an RPC, the request layer calls Provider.authenticator to get an Authenticator.

The authenticator authorizes one request. It adds the required headers to nebius.base.metadata.Metadata. For example, it can add an authorization bearer token. After an authentication failure, the request layer calls Authenticator.can_retry. If permitted, it retries with the same authenticator.

Class Authenticator Abstract interface for performing per-request authentication.
Class Provider Factory abstraction that supplies an Authenticator.