Table of Contents

Class AmbientTokenProvider

Namespace
Sigstore.Oidc
Assembly
Sigstore.dll

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

httpClient HttpClient

Properties

IsAvailable

Whether this provider can supply a token in the current environment.

public bool IsAvailable { get; }

Property Value

bool

Methods

GetTokenAsync(string, CancellationToken)

Returns an OIDC token for the specified audience.

public Task<string> GetTokenAsync(string audience, CancellationToken cancellationToken)

Parameters

audience string

OIDC audience (e.g. "sigstore").

cancellationToken CancellationToken

Cancellation token.

Returns

Task<string>