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 #

Copied to clipboard!
public CompletableFuture<Boolean> credentialsExist(final 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!
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");
}