getCredentialFields

// Using callbacks (node.js or browser)
kuzzle.security.getCredentialFields('local', function (error, fields) {

});

// Using promises (node.js)
kuzzle
  .security
  .getCredentialFieldsPromise('local')
  .then(fields => {

  });
kuzzle.security.getCredentialFields("local", new ResponseListener<String[]>() {
  @Override
  public void onSuccess(String[] fields) {

  }

  @Override
  public void onError(JSONObject error) {
    // Handle error
  }
}
<?php
use \Kuzzle\Kuzzle;

$kuzzle = new Kuzzle('localhost');
$fields = $kuzzle->security->getCredentialFields('local');

Callback response:

[
  "kuid",
  "username"
]

Get credential information of the specified strategy.


getCredentialFields(strategy, [options], callback)

ArgumentsTypeDescription
strategystringStrategy you want to get credentials from
optionsJSON objectOptional parameters
callbackfunctionCallback handling the response

Options

OptionTypeDescriptionDefault
queuablebooleanMark this request as (not) queuabletrue

Callback response

The response is a an array reflecting the credential fields.