Home - evansims/openfga-php GitHub Wiki

OpenFGA PHP SDK

Stop writing authorization logic. Start asking questions.

composer require evansims/openfga-php



Getting Started

Build your authorization integration

  • Introduction
    Start here to get your first authorization check working.
  • Installation
    Install the SDK and set up required dependencies for your environment.
  • Authentication
    Set up authentication for production environments and managed services.


Essentials

Learn the core concepts and patterns

  • Stores
    Manage authorization stores for multi-tenant applications and environment separation.
  • Authorization Models
    Learn how to define your permission rules using OpenFGA's intuitive DSL.
  • Relationship Tuples
    Understand how to grant and revoke specific permissions between users and resources.
  • Permission Queries
    Master the four types of queries: check permissions, list objects, find users, and expand relationships.
  • Assertions
    Define test cases to verify your authorization model.


Features

Explore advanced features and patterns

  • Helper Functions
    Simplify your code with convenient helper functions for common authorization operations.
  • Concurrency
    Leveraging the SDK's powerful concurrency features to improve performance when working with large-scale authorization operations.
  • Exceptions
    Handling errors and exceptions in your authorization system.
  • Integration
    Integrating OpenFGA with your existing systems and frameworks.
  • Observability
    Essential tracing and metrics to monitor your authorization system, including advanced event-driven telemetry and custom monitoring patterns.
  • Results
    Building robust applications with proper response handling using the SDK's Result pattern.
⚠️ **GitHub.com Fallback** ⚠️