SDK
SDK Java v3.x
2

# UpdateMyCredentials

Updates the current user's credentials for the specified strategy. The credentials to send will depend on the authentication plugin and the authentication strategy.

# Arguments

Copied to clipboard!
CompletableFuture<ConcurrentHashMap<String, Object>> updateMyCredentials(
  final String strategy,
  final ConcurrentHashMap<String, Object> credentials)
  throws NotConnectedException, InternalException
Argument Type Description
strategy
String
Strategy to use
credentials
ConcurrentHashMap<String, Object>
JObject representing the credentials

# Return

A ConcurrentHashMap representing the updated credentials with the following properties:

Property Type Description
username
String
The Username
kuid
String
The user's kuid

# Usage

Copied to clipboard!
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().updateMyCredentials("local", credentials).get();