getAllCredentialFields

// Using callbacks (node.js or browser)
kuzzle.security.getAllCredentialFields(function (error, strategies) {

});

// Using promises (node.js)
kuzzle
  .security
  .getAllCredentialFieldsPromise()
  .then(strategies => {

  });
kuzzle.security.getAllCredentialFields(new ResponseListener<JSONObject>() {
  @Override
  public void onSuccess(JSONObject strategies) {

  }

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

$kuzzle = new Kuzzle('localhost');
$strategies = $kuzzle->security->getAllCredentialFields();

Callback response:

{
  "local": [
    "kuid",
    "username"
  ]
}

Retrieve a list of accepted fields per authentication strategy.


getAllCredentialFields([options], callback)

ArgumentsTypeDescription
optionsJSON objectOptional parameters
callbackfunctionCallback handling the response

Options

OptionTypeDescriptionDefault
queuablebooleanMark this request as (not) queuabletrue

Callback response

The response is a an object reflecting the credentials.