SDK
SDK Java v3.x
2

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

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
ArgumentTypeDescription
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();