validateMyCredentials

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

// Using promises (node.js)
kuzzle
  .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>() {
  @Override
  public void onSuccess(Boolean result) {
    // result var contains either true or false
  }

  @Override
  public void onError(JSONObject error) {
    // Handle error
  }
}
<?php
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)

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

Options

OptionTypeDescriptionDefault
queuablebooleanMark this request as (not) queuabletrue

Callback response

The response is either true or false.