SDK
SDK Java v3.x
2

This SDK is deprecated. We recommend to use the Kuzzle SDK-JVM.
A migration guide is available here

GetCurrentUserAsync #

Returns informations about the user currently loggued with the SDK instance.

Arguments #

public CompletableFuture<ConcurrentHashMap<String, Object>> getCurrentUser()
  throws NotConnectedException, InternalException

Return #

A ConcurrentHashMap representing the User.

PropertyTypeDescription
_id
String
Representing the current user kuid
strategies
Array
Available authentication strategies for that user
_source
ConcurrentHashMap
User information

Usage #

ConcurrentHashMap<String, Object> credentials = new ConcurrentHashMap<>();
credentials.put("username", "foo");
credentials.put("password", "bar");
kuzzle.getAuthController().login("local", credentials).get();
ConcurrentHashMap<String, Object> result = kuzzle.getAuthController().getCurrentUser().get();