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