API Models UserObjectInterface - evansims/openfga-php GitHub Wiki
Represents a user object in OpenFGA authorization model. User objects are typed entities that can be subjects in authorization relationships. They consist of a type (for example 'user', 'group') and a unique identifier within that type.
Table of Contents
OpenFGA\Models
ModelInterface
Stringable
JsonSerializable
- UserObject (implementation)
public function getId(): string
Get the unique identifier of the user object. The ID is unique within the context of the object type and represents the specific instance of the typed object.
string
— The object identifier
public function getType(): string
Get the type of the user object. The type defines the category or class of the object (for example 'user', 'group', 'organization') and must be defined in the authorization model.
string
— The object type
public function jsonSerialize(): array
Serialize the user object to its JSON representation.
array