Skip to main contentModule key_store
Source - TOKEN_PREFIX
- Token prefix that signals agent mode in the credential parameter.
- delete_api_key
- Delete an API key by ID.
- generate_token
- Generate a random API token:
ows_key_<64 hex chars> (256 bits of entropy). - hash_token
- SHA-256 hash of the raw token string, hex-encoded.
- list_api_keys
- List all API keys, sorted by creation time (newest first).
- load_api_key
- Load an API key by its ID.
- load_api_key_by_token_hash
- Look up an API key by the SHA-256 hash of the token.
Scans all key files — O(n) in the number of keys.
- save_api_key
- Save an API key file to
~/.ows/keys/<id>.json with strict permissions.