SDK
SDK Java v3.x
2

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

ValidateMyCredentials #

Validates the current user's credentials for the specified strategy. This method returns true if the provided credentials are valid; otherwise an error is triggered. This route does not actually create or modify the user credentials. The credentials to send will depend on the authentication plugin and authentication strategy.

Arguments #

Copied to clipboard!
CompletableFuture<Boolean> validateMyCredentials(final String strategy,
  final ConcurrentHashMap<String, Object> credentials)
  throws NotConnectedException, InternalException
Argument Type Description
strategy
String
Strategy to use
credentials
ConcurrentHashMap<String, Object>
A Hashmap representing the credentials

Return #

A boolean indicating if the credentials are valid.

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 result = kuzzle.getAuthController().validateMyCredentials("local", credentials).get();