CreateMyCredentials #
Creates the current user's credentials for the specified strategy.
Arguments #
public CompletableFuture<ConcurrentHashMap<String, Object>> createMyCredentials(final String strategy,
final ConcurrentHashMap<String, Object> credentials)
throws NotConnectedException, InternalException
Argument | Type | Description |
---|---|---|
strategy | String | Strategy to use |
credentials | ConcurrentHashMap<String, Object> | ConcurrentHashMap representing the credentials |
Return #
A ConcurrentHashMap representing the new credentials.
Usage #
ConcurrentHashMap<String, Object> credentials = new ConcurrentHashMap<>();
credentials.put("username", "foo");
credentials.put("password", "bar");
ConcurrentHashMap<String, Object> newCredentials = new ConcurrentHashMap<>();
newCredentials.put("username", "foo2");
newCredentials.put("password", "bar2");
ConcurrentHashMap<String, Object> response =
kuzzle.getAuthController().login("local", credentials).get();
kuzzle.getAuthController().createMyCredentials("other", newCredentials).get();
Edit this page on Github(opens new window)