@radzor/api-key-auth
API key authentication middleware. Generate, validate, hash, and revoke API keys.
Authenticationv0.1.0typescriptpythonServerapi-keyauthenticationmiddlewaresecurityauthby Radzor
Install
View source on GitHub →$npx radzor@latest add api-key-auth
⚠ Constraints: No external dependencies. Keys are hashed with SHA-256 — never store plain-text keys. Header name and prefix are configurable.
Inputs
| Name | Type | Default | Description |
|---|---|---|---|
| headerName | string | — | HTTP header name for API key (default: 'x-api-key') |
| prefix | string | — | API key prefix (default: 'rz_') |
headerNamestring
HTTP header name for API key (default: 'x-api-key')
prefixstring
API key prefix (default: 'rz_')
Outputs
| Name | Type | Description |
|---|---|---|
| validationResult | { valid: boolean; keyId: string | null } | Result of the API key validation check. |