CredentialsExist #
Checks that the current user has credentials for the specified strategy.
Arguments #
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 #
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");
}
Edit this page on Github(opens new window)