SDK
SDK Jvm v1.x
2

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
ArgumentTypeDescription
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>
ArgumentTypeDescription
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()

::: ::::