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 | The 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 |
Return a fresh TokenAuthenticator for a request.
| Returns | |
TokenAuthenticator | A token-based authenticator instance. |