TomAzureManagedIdentityCredential class

The managed identity of the host the server runs on.

App Service and Container Apps expose it through IDENTITY_ENDPOINT and IDENTITY_HEADER; a VM through the instance metadata endpoint. The constructor reads which one is there.

Implemented types

Constructors

TomAzureManagedIdentityCredential({String? clientId, Uri? endpoint, String? identityHeader, Map<String, String> environment = const {}, DateTime clock()?})
The identity clientId when the host has several, else the system one.

Properties

clientId → String?
The user-assigned identity's client id, or null for the system one.
final
endpoint → Uri
Where tokens are requested.
final
hashCode → int
The hash code for this object.
no setterinherited
identityHeader → String?
The App Service identity header, or null on a VM.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

fetchToken(Client client) → Future<(String, Duration)>
Fetches a token and its lifetime.
invalidate() → void
Drops a cached token, so the next token fetches a new one.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
token(Client client) → Future<String>
A token valid for Key Vault, from cache while it is fresh.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited