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.
Property | Type | Description |
---|---|---|
_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();
Edit this page on Github(opens new window)