API Models UsersListUserInterface - evansims/openfga-php GitHub Wiki

Represents a user in a list context for authorization operations. UsersListUser provides a simple wrapper around user identifiers, ensuring they conform to the expected format and can be properly serialized for API operations. This is commonly used in list operations where user identifiers need to be processed in bulk. Use this interface when working with lists of users in authorization contexts, such as batch operations or user enumeration.

Table of Contents


Namespace

OpenFGA\Models


Source

View source code


Implements


Related Classes


Methods

getUser

public function getUser(): string

Get the user identifier string. This returns the user identifier in the format expected by OpenFGA, typically "type:id" where type describes the kind of user and id is the unique identifier for that user.

View source


Returns

string — The user identifier string


jsonSerialize

public function jsonSerialize(): string

Serialize the user to its JSON representation. Returns the user identifier as a string for API serialization. This differs from most models which serialize to arrays.

View source


Returns

string — The user identifier string

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