Skip to main content
Table of Contents

Class ApiKeyAuthenticationOptions

Namespace
Stratara.Identity.AspNetCore.Authentication
Assembly
Stratara.Identity.AspNetCore.dll

Options for the Stratara API-key authentication scheme.

public sealed class ApiKeyAuthenticationOptions : AuthenticationSchemeOptions
Inheritance
ApiKeyAuthenticationOptions
Inherited Members
Extension Methods

Fields

DefaultHeaderName

The default request header carrying the raw key — X-Api-Key.

public const string DefaultHeaderName = "X-Api-Key"

Field Value

string

QueryParameterName

The query parameter consulted when AllowQueryStringKey is enabled — access_token.

public const string QueryParameterName = "access_token"

Field Value

string

SchemeName

The default scheme name — StrataraApiKey.

public const string SchemeName = "StrataraApiKey"

Field Value

string

Properties

AllowQueryStringKey

Also accept the key via the access_token query parameter. Off by default — query strings leak into logs and referrers; enable only for transports that cannot send custom headers (for example SignalR WebSocket negotiation).

public bool AllowQueryStringKey { get; set; }

Property Value

bool

HeaderName

The request header carrying the raw key. Defaults to DefaultHeaderName.

public string HeaderName { get; set; }

Property Value

string