class documentation

Provider that builds TokenAuthenticator instances.

The provider owns a token.Bearer and returns a fresh TokenAuthenticator for each call to authenticator.

Example

Construct a bearer-backed provider and (illustratively) pass it to the SDK via the credentials parameter:

from nebius.aio.token.static import EnvBearer
from nebius.aio.authorization.token import TokenProvider
from nebius.sdk import SDK

bearer = EnvBearer("NEBIUS_IAM_TOKEN")
provider = TokenProvider(bearer)
sdk = SDK(credentials=provider)  # illustrative only
Parameters
token_providerThe bearer token provider used to obtain receivers for per-request authenticators.
Method __init__ Create a token provider.
Method authenticator Return a fresh TokenAuthenticator for a request.
Instance Variable _provider Undocumented
def __init__(self, token_provider: token.Bearer): (source)

Create a token provider.

def authenticator(self) -> Authenticator: (source)

Return a fresh TokenAuthenticator for a request.

Returns
TokenAuthenticatorA token-based authenticator instance.
_provider = (source)

Undocumented