Skip to main content

Module api_key

Module api_key 

Source

Structs§

ApiKeyCallbackContext
Immutable application context for trusted API-key lookup and validation.
ApiKeyConfig
Configuration for the API Key plugin, aligned with the TypeScript ApiKeyOptions.
ApiKeyErrorDetails
Additional information returned when a key reaches its rate limit.
ApiKeyGenerationOptions
Inputs passed to an application key generator; length excludes the prefix.
ApiKeyPlugin
API Key management plugin.
ApiKeyPluginBuilder
Use builder syntax to set the inputs and finish with build().
ApiKeyValidationError
An API key rejection with the upstream error code and response fields.
ApiKeyVerificationInput
Input to the registered server-only verification operation.
ApiKeyVerificationOutput
CreateKeyRequest
API key creation parameters for HTTP and trusted server callers.
CreateKeyResponse
Newly issued API key. The plaintext key is only returned during creation.
DeleteExpiredApiKeysResponse
Result of trusted forced expiration cleanup. Store failures are logged.
DeleteKeyRequest
Parameters for deleting one API key as an authenticated caller.
DeleteKeyResponse
Result of deleting an API key through the authenticated server API.
GetKeyQuery
Query for reading one API key through the authenticated server API.
KeyExpirationConfig
Key expiration constraints.
ListKeysQuery
Query parameters accepted by GET /api-key/list.
ListKeysResponse
Paginated API key response; absent pagination parameters are omitted.
RateLimitDefaults
Global rate-limit defaults applied to newly-created keys.
UpdateKeyRequest
API key updates for HTTP and trusted server callers.
VerifyApiKey
Inputs for server-only API key verification. Verification consumes one use.

Enums§

ApiKeyErrorCode
Dedicated API Key error codes aligned with the TypeScript API_KEY_ERROR_CODES.
ApiKeyErrorMessage
Upstream verification messages can contain either text or an error-code object.
ApiKeyReferences
Which kind of entity a configuration’s keys belong to.
ApiKeyStorageMode
API-key persistence policy. Secondary-only admission is a non-atomic merge; use database fallback for durable, guarded quota and rate-limit admission.
ApiKeyVerificationError
Distinguishes a rejected credential from a storage or infrastructure failure.

Traits§

ApiKeyDefaultPermissions
Trusted dynamic defaults, evaluated even when creation supplies an override.
ApiKeyGenerator
Trusted custom secret generation. The application owns the returned full key.
ApiKeyGetter
Application lookup replaces configured API-key headers entirely.
ApiKeyStorage
Application-owned serialized API-key storage. None TTL means permanent. Implementations must propagate failures; these operations are not atomic admission.
ApiKeyValidator
Trusted acceptance predicate, evaluated before key usage is consumed.

Type Aliases§

ApiKeyPermissions
Ordered resource/action permissions, following JavaScript object insertion order.