SDK
SDK Java v3.x
2

This SDK is deprecated. We recommend to use the Kuzzle SDK-JVM.
A migration guide is available here

CredentialsExist #

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

Arguments #

public CompletableFuture<Boolean> credentialsExist(final String strategy)
  throws NotConnectedException, InternalException
ArgumentTypeDescription
strategy
String
Strategy to use

Return #

A boolean indicating if credentials exist for the strategy.

Usage #

ConcurrentHashMap<String, Object> credentials = new ConcurrentHashMap<>();
credentials.put("username", "foo");
credentials.put("password", "bar");
kuzzle.getAuthController().login("local", credentials).get();
Boolean exists = kuzzle.getAuthController().credentialsExist("local").get();
if (exists) {
  System.out.println("Credentials exists for local strategy");
}