Class AmbientTokenProvider
Ordered chain of ambient OIDC token providers: GitHub Actions → SIGSTORE_ID_TOKEN env var.
Throws OidcTokenException if no provider is available.
public sealed class AmbientTokenProvider : IOidcTokenProvider
- Inheritance
-
AmbientTokenProvider
- Implements
- Inherited Members
Constructors
AmbientTokenProvider(HttpClient)
Creates an ambient provider chain.
public AmbientTokenProvider(HttpClient httpClient)
Parameters
httpClientHttpClient
Properties
IsAvailable
Whether this provider can supply a token in the current environment.
public bool IsAvailable { get; }
Property Value
Methods
GetTokenAsync(string, CancellationToken)
Returns an OIDC token for the specified audience.
public Task<string> GetTokenAsync(string audience, CancellationToken cancellationToken)
Parameters
audiencestringOIDC audience (e.g. "sigstore").
cancellationTokenCancellationTokenCancellation token.