Releases: openfga/dotnet-sdk
v0.5.1
0.5.1 (2024-09-10)
- feat: export OpenTelemetry metrics. Refer to the OpenFGA .NET SDK OpenTelemetry documentation for more.
v0.5.0
0.5.0 (2024-08-28)
- feat: support consistency parameter (#70)
- Note: To use this feature, you need to be running OpenFGA v1.5.7+ with the experimental flag
enable-consistency-params
enabled. See the v1.5.7 release notes for details.%0A
v0.4.0
0.4.0 (2024-06-14)
- chore!: remove excluded users from ListUsers response
BREAKING CHANGE:
This version removes the ExcludedUsers
field from the ListUsersResponse
and ClientListUsersResponse
classes, for more details see the associated API change.
v0.3.2
v0.3.1
v0.3.0
0.3.0 (2023-12-20)
- feat!: initial support for conditions
- feat!: allow overriding storeId per request (#33)
- feat: support specifying a port and path for the API (You can now set the
ApiUrl
to something like:https://api.fga.exampleL8080/some_path
) - feat: validate that store id and auth model id in ulid format (#23)
- fix: exception when using the same configuration with multiple clients (#26)
- fix:
OpenFgaClient.ReadLatestAuthorizationModel
can now return a null if no model has ever been created in that store - fix:
OpenFgaClient.Read
andOpenFgaClient.ReadChanges
now allow a null body - chore!: use latest API interfaces
- chore: dependency updates
BREAKING CHANGES: Note: This release comes with substantial breaking changes, especially to the interfaces due to the protobuf changes in the last release.
While the http interfaces did not break (you can still use v0.2.5
SDK with a v1.3.8+
server), the grpc interface did and this caused a few changes in the interfaces of the SDK.
If you are using OpenFgaClient
, the changes required should be smaller, if you are using OpenFgaApi
a bit more changes will be needed.
You will have to modify some parts of your code, but we hope this will be to the better as a lot of the parameters are now correctly marked as required, and so the Pointer-to-String conversion is no longer needed.
Some of the changes to expect:
- When initializing a client, please use
ApiUrl
. The separateApiScheme
andApiHost
fields have been deprecated
var configuration = new ClientConfiguration() {
ApiUrl = Environment.GetEnvironmentVariable("FGA_API_URL"), // required, e.g. https://api.fga.example
StoreId = Environment.GetEnvironmentVariable("FGA_STORE_ID"), // not needed when calling `CreateStore` or `ListStores`
AuthorizationModelId = Environment.GetEnvironmentVariable("FGA_AUTHORIZATION_MODEL_ID"), // Optional, can be overridden per request
};
var fgaClient = new OpenFgaClient(configuration);
OpenFgaApi
now requiresstoreId
as first param when neededConfiguration
no longer acceptsstoreId
(ClientConfiguration
is not affected)- The following request interfaces changed:
CheckRequest
: theTupleKey
field is now of interfaceCheckRequestTupleKey
, you can also now pass inContext
ExpandRequest
: theTupleKey
field is now of interfaceExpandRequestTupleKey
ReadRequest
: theTupleKey
field is now of interfaceReadRequestTupleKey
WriteRequest
: now takesWriteRequestWrites
andWriteRequestDeletes
, the latter of which acceptsTupleKeyWithoutCondition
- And more
- The following interfaces had fields that were pointers are are now the direct value:
CreateStoreResponse
GetStoreResponse
ListStoresResponse
ListObjectsResponse
ReadChangesResponse
ReadResponse
AuthorizationModel
- And more
Take a look at fa43463 for more model changes.
v0.2.5
v0.2.4
v0.2.3
0.2.3 (2023-04-13)
- fix: changed interface of contextual tuples in
ClientListObjects
to beClientTupleKey
instead ofTupleKey
- fix: Client
WriteAuthorizationModel
now expectsClientWriteAuthorizationModelRequest
instead ofWriteAuthorizationModelRequest
- chore: changed a few interfaces to expect interfaces instead of classes
v0.2.2
0.2.2 (2023-04-12)
- feat(client): add OpenFgaClient wrapper see docs, see the
v0.2.1
docs for the OpenFgaApi docs - feat(client): implement
BatchCheck
to check multiple tuples in parallel - feat(client): implement
ListRelations
to check in one call whether a user has multiple relations to an objects - feat(client): add support for a non-transactional
Write
- chore(config): bump default max retries to
15
- fix: retry on 5xx errors