ApiKeyConfig

Configuration for the apiKey strategy factory.

lookup is required. The identity type your ApiKeyLookup returns is your own — bring your own type; roles come from ApiKeyDetails.roles. Builds an ApiKeyAuthenticator. HTTP-only — there is no WebSocket variant.

Properties

Link copied to clipboard

Renders 403 responses for authenticated callers denied by authorization. Defaults to a bare 403.

Link copied to clipboard

Resolves a raw API key to its owner's ApiKeyDetails. Required; throws SecurityConfigurationException if unset when the strategy is built.

Link copied to clipboard

Locates the raw API key in the request. Defaults to ApiKeyResolver.DEFAULT (X-Api-Key header).

Link copied to clipboard

Renders 401 responses for failed or absent authentication. Defaults to UnauthorizedHandler.DEFAULT (bare HTTP 401).