Skip to content

EveVercelOidcAuthentication

NexusLabs.Eve

EveVercelOidcAuthentication Class

Supplies one Vercel OIDC token as both bearer and trusted-identity headers.

public sealed class EveVercelOidcAuthentication : NexusLabs.Eve.IEveAuthentication

Inheritance System.Object → EveVercelOidcAuthentication

Implements IEveAuthentication

Constructors

EveVercelOidcAuthentication(string) Constructor

Initializes Vercel OIDC authentication with a static token.

public EveVercelOidcAuthentication(string token);

Parameters

token System.String

The Vercel OIDC token.

EveVercelOidcAuthentication(Func\<CancellationToken,ValueTask\<string>>) Constructor

Initializes Vercel OIDC authentication with a per-request token provider.

public EveVercelOidcAuthentication(System.Func<System.Threading.CancellationToken,System.Threading.Tasks.ValueTask<string>> tokenProvider);

Parameters

tokenProvider System.Func<System.Threading.CancellationToken,System.Threading.Tasks.ValueTask<System.String>>

The provider invoked before each request.

Properties

EveVercelOidcAuthentication.AuthenticationHeaderNames Property

Gets header names owned by this provider even when no value is emitted for a request. Implementations should declare every credential header so generic per-request headers cannot replace credentials when token resolution returns an empty result.

public System.Collections.Generic.IReadOnlyCollection<string> AuthenticationHeaderNames { get; }

Implements AuthenticationHeaderNames

Property Value

System.Collections.Generic.IReadOnlyCollection<System.String>

Methods

EveVercelOidcAuthentication.GetHeadersAsync(CancellationToken) Method

Resolves headers immediately before an HTTP request is sent.

public System.Threading.Tasks.ValueTask<System.Collections.Generic.IReadOnlyDictionary<string,string>> GetHeadersAsync(System.Threading.CancellationToken cancellationToken);

Parameters

cancellationToken System.Threading.CancellationToken

Cancels credential resolution.

Implements GetHeadersAsync(CancellationToken)

Returns

System.Threading.Tasks.ValueTask<System.Collections.Generic.IReadOnlyDictionary<System.String,System.String>>
Authentication headers whose values override client-level and generic per-request headers. A protected value can be replaced only through an explicitly allowed protected-header override.