API Responses CheckResponseInterface - evansims/openfga-php GitHub Wiki
Interface for permission check response objects. This interface defines the contract for responses returned when performing permission checks in OpenFGA. A check response indicates whether a specific user has a particular permission on a given object, based on the authorization model and current relationship data. Permission checking is the core operation of OpenFGA, allowing applications to make authorization decisions by evaluating user permissions against the defined relationship model and stored tuples.
Table of Contents
OpenFGA\Responses
- CheckResponse (implementation)
- CheckRequestInterface (request)
public function getAllowed(): bool|null
Get whether the permission check was allowed. This is the primary result of the permission check operation, indicating whether the specified user has the requested permission on the given object according to the authorization model and current relationship data.
bool
| null
— True if permission is granted, false if denied, or null if the result is indeterminate
public function getResolution(): string|null
Get the resolution details for the permission decision. This provides additional information about how the permission decision was reached, which can be useful for understanding complex authorization logic or debugging permission issues.
string
| null
— The resolution details explaining the permission decision, or null if not provided