Skip to content

Support contextual tuples an assertion in OpenFGAClient #449

Description

@ewanharris

Checklist

Describe the problem you'd like to have solved

OpenFGA now supports adding contextual tuples to an assertion, in #448 we will be updating the OpenFGAApi to support this but will need to do some work to expose this in the OpenFGAClient.

Note that the request body for WriteAssertions treats contextual_tuples similar to ListUsers in that it is an array of tuple objects (as opposed to Check which accepts an object with a tuple_keys property).

Describe the ideal solution

The WriteAssertions and ReadAssertions endpoints are updated to support contextual_tuples.

As a rough plan of work:

  • Update the existing ClientAssertion type in each language to include contextual_tuples, it should be an array of ClientTuple`
  • Where necessary handle converting from ClientTuple to TupleKey (see how the SDK ListUsers method handles this)
  • Update any existing tests to include sending contextual_tuples
  • Ensure documentation is updated

Alternatives and current workarounds

No response

References

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    dotnet-sdkAffects the C#/DotNet SDKenhancementNew feature or requestgo-sdkAffects the Go SDKjava-sdkAffects the Java/Kotlin SDK

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions