SDK
SDK Jvm v1.x
2

CredentialsExist #

Checks that the current user has credentials for the specified strategy.

:::: tabs ::: tab Java

Arguments #

Copied to clipboard!
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 #

Copied to clipboard!
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 #

Copied to clipboard!
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 #

Copied to clipboard!
kuzzle.authController.login("local", HashMap<String, Any?>().apply {
  put("username", "foo")
  put("password", "bar")
}).get()
val result: Boolean = kuzzle.authController.credentialsExist("local").get()

::: ::::