alepha@docs:~/docs/packages/alepha/api$
cat keys.md1 min read
Last commit:
#Alepha - Api Keys
#Installation
Part of the alepha package. Import from alepha/api/keys.
npm install alepha
#Overview
API key management module for programmatic access.
Features:
- Create API keys with role snapshots
- List and revoke API keys
- 15-minute validation caching
- Query param (?api_key=) and Bearer header support
Integration: To enable API key authentication for an issuer, register the resolver:
ts
1class MyApp {2 apiKeyService = $inject(ApiKeyService);3 issuer = $issuer({4 secret: env.APP_SECRET,5 resolvers: [this.apiKeyService.createResolver()],6 });7}