-
Notifications
You must be signed in to change notification settings - Fork 6
API Responses ListUsersResponse
Response containing a list of users that have a specific relationship with an object. This response provides a collection of users (including user objects, usersets, and typed wildcards) that have the specified relationship with the target object. Use this to discover who has access to resources in your authorization system.
Table of Contents
OpenFGA\Responses
- ListUsersResponseInterface (interface)
- ListUsersRequest (request)
Implements Responses\ListUsersResponseInterface
public function fromResponse(
HttpResponseInterface $response,
HttpRequestInterface $request,
SchemaValidatorInterface $validator,
): staticCreate a response instance from an HTTP response. This method transforms a raw HTTP response from the OpenFGA API into a structured response object, validating and parsing the response data according to the expected schema. It handles both successful responses by parsing and validating the data, and error responses by throwing appropriate exceptions.
| Name | Type | Description |
|---|---|---|
$response |
HttpResponseInterface |
The raw HTTP response from the OpenFGA API |
$request |
HttpRequestInterface |
The original HTTP request that generated this response |
$validator |
SchemaValidatorInterface |
Schema validator for parsing and validating response data |
static — The parsed and validated response instance containing the API response data
public function getUsers(): OpenFGA\Models\Collections\UsersInterfaceGet the collection of users with the specified relationship. Returns a type-safe collection containing the user objects that have the queried relationship with the specified object. Each user represents an entity that has been granted the specified permission or relationship.
UsersInterface — The collection of users with the relationship
Implements Responses\ListUsersResponseInterface
public function schema(): SchemaInterfaceGet the schema definition for this response. Returns the schema that defines the structure and validation rules for user listing response data, ensuring consistent parsing and validation of API responses.
SchemaInterface — The schema definition for response validation
Getting Started: Introduction • Installation • Authentication
Essentials: Stores • Authorization Models • Relationship Tuples • Permissions Queries
Features: Helper Functions • Concurrency • Results • Exceptions • Observability • Integration
- API Reference - Full class and method documentation
- Quickstart - Get up and running in minutes
- Helpers - Convenient shortcuts for common operations
- Testing Guide - Unit testing with the SDK
- Performance Guide - Optimize for high-scale applications
- Report Issues - Bug reports and feature requests
- Discussions - Community support and questions
- Contributing - Help improve the SDK
- Changelog - Latest updates and releases
- OpenFGA Documentation - Official OpenFGA documentation
- OpenFGA Playground - Interactive modeling environment
- Authorization Concepts - Learn relationship-based access control
- Other SDKs - JavaScript, Go, Python, .NET, and more
OpenFGA PHP SDK • Apache 2.0 License
- Authorization Stores
- Authorization Models
- Relationship Tuples
- Permission Queries
- Testing with Assertions
- Helper Functions
- Concurrency
- Error Handling
- Framework Integration
- OpenTelemetry Observability
- Result Pattern
- Event Dispatcher
- HTTP Request Sent Event
- HTTP Response Received Event
- Operation Started Event
- Operation Completed Event
- More Events …
- Authentication Exception
- Client Exception
- Configuration Exception
- Network Exception
- Serialization Exception
- More Exceptions …
- Request Manager
- Request Context
- Circuit Breaker
- Parallel Task Executor
- Fiber Concurrent Executor
- Simple Concurrent Executor
- Retry Handler
- Exponential Backoff Retry Strategy
- More Networking …