Class GitHubActionsTokenProvider
Obtains an OIDC token from the GitHub Actions runtime via
ACTIONS_ID_TOKEN_REQUEST_URL and ACTIONS_ID_TOKEN_REQUEST_TOKEN.
public sealed class GitHubActionsTokenProvider : IOidcTokenProvider
- Inheritance
-
GitHubActionsTokenProvider
- Implements
- Inherited Members
Constructors
GitHubActionsTokenProvider(HttpClient)
Creates a provider backed by the given httpClient.
public GitHubActionsTokenProvider(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.