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


Namespace

OpenFGA\Models


Source

View source code


Implements


Related Classes


Methods

getId

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.

View source


Returns

string — The object identifier


getType

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.

View source


Returns

string — The object type


jsonSerialize

public function jsonSerialize(): array

Serialize the user object to its JSON representation.

View source


Returns

array

⚠️ **GitHub.com Fallback** ⚠️