API Models AssertionTupleKeyInterface - evansims/openfga-php GitHub Wiki
Defines the contract for assertion tuple keys used in authorization model testing. An assertion tuple key specifies the user, relation, and object combination that should be tested in authorization model assertions. This is used to verify that your authorization model behaves correctly for specific scenarios. Use this when creating test cases to validate your authorization rules and ensure your permission model works as expected.
Table of Contents
OpenFGA\Models
ModelInterface
JsonSerializable
- AssertionTupleKey (implementation)
public function getObject(): string
Get the object being tested in the assertion. This represents the resource or entity that the assertion is testing access to. In assertion testing, this is the object part of the tuple being validated against the authorization model.
string
— The object identifier being tested
public function getRelation(): string
Get the relation being tested in the assertion. This represents the type of relationship or permission being tested in the assertion. It defines what kind of access is being validated between the user and object.
string
— The relation name being tested
public function getUser(): string
Get the user being tested in the assertion. This represents the subject (user, group, role, etc.) whose access is being tested in the assertion. It's the entity for which we're validating whether they have the specified relation to the object.
string
— The user identifier being tested
public function jsonSerialize(): array
array