Skip to main content

Module keys

Module keys 

Source
Expand description

API key tables, secret hashing, and per-request capability resolution.

Structs§

OpenAiGatewayKey
An API key registered with the gateway, holding its hashed secret and the capability ceiling it grants.
OpenAiKeyTable
Thread-safe table of gateway API keys indexed by secret hash.

Constants§

OPENAI_GATEWAY_KEY_OBJECT
Object tag identifying a serialized OpenAiGatewayKey descriptor.

Functions§

global_openai_key_table
Returns the process-wide shared gateway key table, initializing it on first use.
grant_capability_set
Grants every capability in capabilities to cx.
key_hash
Returns the lowercase hex SHA-256 hash of a key secret.
redacted_gateway_request
Returns a copy of request with sensitive auth headers replaced by [redacted].