@flexauth/core
v1.0.11
Published
Core FlexAuth RBAC SDK - Flexible Role-Based Access Control
Maintainers
Readme
@flexauth/core
The core logic for FlexAuth, a flexible Role-Based Access Control (RBAC) system. This package handles permission checks, role management, and condition evaluation.
Installation
npm install @flexauth/core
# or
bun add @flexauth/coreUsage
import { FlexAuth } from "@flexauth/core";
import { MemoryAdapter } from "@flexauth/core/adapters";
const auth = new FlexAuth({
adapter: new MemoryAdapter()
});
// Check permissions
const allowed = await auth.can("user_123", "read", "document");