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.
:::: tabs ::: tab Java
Arguments #
CompletableFuture<Map<String, Object>> updateMyCredentials(
String strategy,
Map<String, Object> credentials)
throws NotConnectedException, InternalException
Argument | Type | Description |
---|---|---|
strategy | String | Strategy to use |
credentials | Map<String, Object> | JObject representing the credentials |
Return #
A Map representing the updated credentials with the following properties:
Property | Type | Description |
---|---|---|
username | String | The Username |
kuid | String | The user's kuid |
Usage #
Map<String, Object> credentials = new HashMap<>();
credentials.put("username", "foo");
credentials.put("password", "bar");
kuzzle.getAuthController().login("local", credentials).get();
Map<String, Object> result = kuzzle.getAuthController().updateMyCredentials("local", credentials).get();
::: ::: tab Kotlin
Arguments #
fun updateMyCredentials(
strategy: String,
credentials: Map<String, Any?>): CompletableFuture<Map<String, Any?>>
Argument | Type | Description |
---|---|---|
strategy | String | Strategy to use |
credentials | Map<String, Any?> | JObject representing the credentials |
Return #
A Map representing the updated credentials with the following properties:
Property | Type | Description |
---|---|---|
username | String | The Username |
kuid | String | The user's kuid |
Usage #
val credentials = HashMap<String, Any?>().apply {
put("username", "foo")
put("password", "bar")
}
kuzzle.authController.login("local", credentials).get()
val result: Map<String, Any?> =
kuzzle.authController.updateMyCredentials("local", credentials).get();
::: ::::
Edit this page on Github(opens new window)