API

Explore the detailed API documentation for access-gate to understand how to leverage its core components for effective role-based access control (RBAC).

Overview

This API reference is divided into sections covering all the primary building blocks of the library:

  1. Policy: Define and manage granular access rules for specific resources and actions.
  2. Guard: Enforce global or contextual restrictions, including support for asynchronous behavior.
  3. Gate: The central collection of policies and guards, responsible for evaluating access control.
  4. Representative: Represents the user or entity attempting to access a resource and evaluates their permissions.
  5. Decisions: The result of access control checks, allowing you to perform final evaluations.