SDK
SDK Jvm v1.x
2

GetMyRights #

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

:::: tabs ::: tab Java

Arguments #

Copied to clipboard!
public CompletableFuture<ArrayList<Object>> getMyRights()
  throws NotConnectedException, InternalException

Return #

An ArrayList object.

Usage #

Copied to clipboard!
Map<String, Object> credentials = new HashMap<>();
credentials.put("username", "foo");
credentials.put("password", "bar");
kuzzle.getAuthController().login("local", credentials).get();
ArrayList<Object> result = kuzzle.getAuthController().getMyRights().get();

::: ::: tab Kotlin

Arguments #

Copied to clipboard!
fun getMyRights(): CompletableFuture<ArrayList<Any>>

Return #

An ArrayList object.

Usage #

Copied to clipboard!
kuzzle.authController.login("local", HashMap<String, Any?>().apply {
  put("username", "foo")
  put("password", "bar")
}).get()
val result: ArrayList<Any> =
  kuzzle.authController.getMyRights().get()

::: ::::