Table of Contents

Class StaticTokenProvider

Namespace
Sigstore.Oidc
Assembly
Sigstore.dll

Wraps a pre-fetched JWT string. Intended for testing and controlled automation only — not for tokens obtained interactively or from untrusted sources. IsAvailable always returns true; no token validation is performed.

public sealed class StaticTokenProvider : IOidcTokenProvider
Inheritance
StaticTokenProvider
Implements
Inherited Members

Constructors

StaticTokenProvider(string)

Creates a provider that returns token on every call.

public StaticTokenProvider(string token)

Parameters

token string

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>