UpdateSelf #
Updates the current user object in Kuzzle.
Arguments #
CompletableFuture<ConcurrentHashMap<String, Object>> updateSelf(
final ConcurrentHashMap<String, Object> content)
throws NotConnectedException, InternalException
Argument | Type | Description |
---|---|---|
content | ConcurrentHashMap<String, Object> | Hashmap representing the user content |
Return #
Returns a ConcurrentHashMap with the following properties:
Property | Type | Description |
---|---|---|
_id | String | User's kuid |
_source | ConcurrentHashMap<String, Object> | Additional (and optional) user properties |
Usage #
ConcurrentHashMap<String, Object> credentials = new ConcurrentHashMap<>();
credentials.put("username", "foo");
credentials.put("password", "bar");
kuzzle.getAuthController().login("local", credentials).get();
ConcurrentHashMap<String, Object> custom = new ConcurrentHashMap<>();
custom.put("age", 42);
ConcurrentHashMap<String, Object> result =
kuzzle.getAuthController().updateSelf(custom).get();
Edit this page on Github(opens new window)