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 #
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 #
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();
Edit this page on Github(opens new window)