GetMyCredentials #
Returns the current user's credential information for the specified strategy. The data returned will depend on the specified strategy. The result can be empty.
:::: tabs ::: tab Java
Arguments #
public CompletableFuture<Map<String, Object>> getMyCredentials(String strategy)
throws NotConnectedException, InternalException
Argument | Type | Description |
---|---|---|
strategy | String | Strategy to use |
Return #
Returns a Map representing the credentials for the provided authentication strategy.
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().getMyCredentials("local").get();
::: ::: tab Kotlin
Arguments #
fun getMyCredentials(
strategy: String): CompletableFuture<Map<String, Any?>>
Argument | Type | Description |
---|---|---|
strategy | String | Strategy to use |
Return #
Returns a Map representing the credentials for the provided authentication strategy.
Usage #
kuzzle.authController.login("local", HashMap<String, Any?>().apply {
put("username", "foo")
put("password", "bar")
}).get()
val result: Map<String, Any?> =
kuzzle.authController.getMyCredentials("local").get()
::: ::::
Edit this page on Github(opens new window)