CredentialsExist #
Checks that the current user has credentials for the specified strategy.
:::: tabs ::: tab Java
Arguments #
public CompletableFuture<Boolean> credentialsExist(String strategy)
throws NotConnectedException, InternalException
Argument | Type | Description |
---|---|---|
strategy | String | Strategy to use |
Return #
A boolean indicating if credentials exist for the strategy.
Usage #
Map<String, Object> credentials = new HashMap<>();
credentials.put("username", "foo");
credentials.put("password", "bar");
kuzzle.getAuthController().login("local", credentials).get();
Boolean result = kuzzle.getAuthController().credentialsExist("local").get();
::: ::: tab Kotlin
Arguments #
fun credentialsExist(strategy: String): CompletableFuture<Boolean>
Argument | Type | Description |
---|---|---|
strategy | String | Strategy to use |
Return #
A boolean indicating if credentials exist for the strategy.
Usage #
kuzzle.authController.login("local", HashMap<String, Any?>().apply {
put("username", "foo")
put("password", "bar")
}).get()
val result: Boolean = kuzzle.authController.credentialsExist("local").get()
::: ::::
Edit this page on Github(opens new window)