{"repo":"izadoesdev/keypal","free":true,"listed":false,"github":"https://github.com/izadoesdev/keypal","clone":"git clone https://github.com/izadoesdev/keypal.git","description":"A TypeScript library for secure API key management with cryptographic hashing, expiration, scopes, and pluggable storage","language":"TypeScript","stars":203,"topics":["api-keys","authentication","drizzle","hashing","permissions","redis","scopes","security","typescript","keypal"],"license":"MIT","category":"auth-billing-email","readme_excerpt":"keypal A TypeScript library for secure API key management with cryptographic hashing, expiration, scopes, and pluggable storage. Features - Secure by Default : SHA-256/SHA-512 hashing with optional salt and timing-safe comparison - Smart Key Detection : Automatically extracts keys from Authorization , x-api-key , or custom headers - Built-in Caching : Optional in-memory or Redis caching for validated keys - Flexible Storage : Memory, Redis, Drizzle ORM, Prisma, and Kysely adapters included - Scope-based Permissions : Fine-grained access control with resource-specific scopes - Tags : Organize and find keys by tags - Key Management : Enable/disable, rotate, and soft-revoke keys with audit trails - Audit Logging : Track who did what, when, and why (opt-in) - TypeScript : Full type safety - Zero Config : Works out of the box with sensible defaults Installation Quick Start Configuration API Creating & Managing Keys Verifying Keys Permission Checking ResourceBuilder (Fluent API) Build resource-specific scopes with a clean, chainable API: ResourceBuilder Methods: - add(resourceType, resourceId, scopes) - Add scopes to a resource (merges if exists) - addOne(resourceType, resourceId, scope) - Add a single scope - addMany(resourceType, resourceIds, scopes) - Add same scopes to multiple resources - remove(resourceType, resourceId) - Remove entire resource - removeScopes(resourceType, resourceId, scopes) - Remove specific scopes - has(resourceType, resourceId) - Check if resource exists ","default_branch":null,"files":null,"tree":[],"storefront":"/r/izadoesdev","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/izadoesdev/keypal/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}