SDK
SDK C# v1.x
1

You are currently looking at the documentation of a previous version of Kuzzle. We strongly recommend that you use the latest version. You can also use the version selector in the top menu.

GetMyRightsAsync #

Returns the rights for the currently logged in user within the SDK instance.

Arguments #

public async Task<JArray> GetMyRightsAsync();

Return #

A JArray object.

Exceptions #

Throws a KuzzleException if there is an error. See how to handle error.

Usage #

try {
  await kuzzle.Auth.LoginAsync(
    "local",
    JObject.Parse("{username: 'foo', password: 'bar'}"));
  JArray rights = await kuzzle.Auth.GetMyRightsAsync();
  Console.WriteLine(rights.ToString(Formatting.None));
  /*
  [
    {
      "controller": "*",
      "action": "*",
      "collection": "*",
      "index": "*",
      "value": "allowed"
    }
  ]
  */
} catch (KuzzleException e) {
  Console.WriteLine(e);
}