// Using callbacks (node.js or browser)
kuzzle.validateMyCredentials('local', {'username': 'foo'}, function (err, res) {
  console.log(res);     // true or false

// Using promises (node.js)
  .validateMyCredentials('local', {'username': 'foo'})
  .then(res => {
    console.log(res);   // true or false
JSONObject credentials = new JSONObject().put("username", "bar");

kuzzle.validateMyCredentials("local", credentials, new ResponseListener<Boolean>() {
  public void onSuccess(Boolean result) {
    // result var contains either true or false

  public void onError(JSONObject error) {
    // Handle error
use \Kuzzle\Kuzzle;

$kuzzle = new Kuzzle('localhost');
$result = $kuzzle->validateMyCredentials('local', ['username' => 'foo']);

// $result = true or false

Update credentials of the specifiedfor the current user. The credentials to send depends entirely on the authentication plugin and strategy you want to update credentials for.

validateMyCredentials(strategy, credentials, [options], callback)

strategystringStrategy you want to create credentials in
credentialsJSON objectThe credentials
optionsJSON objectOptional parameters
callbackfunctionCallback handling the response


queuablebooleanMark this request as (not) queuabletrue

Callback response

The response is either true or false.