SDK
SDK Javascript v5.x
1

You are currently looking at the documentation of a previous version of Kuzzle. We strongly recommend that you use the latest version. You can also use the version selector in the top menu.

validateCredentials #

Validate credentials of user with kuid for the specified strategy. Resolves to an error if the credentials are invalid.


validateCredentials(strategy, credentials, [options], callback) #

ArgumentsTypeDescription
strategystringStrategy you want to create credentials in
kuidJSON objectUser's kuid
credentialsJSON objectThe credentials
optionsJSON objectOptional parameters
callbackfunctionCallback handling the response

Options #

OptionTypeDescriptionDefault
queuablebooleanMake this request queuable or nottrue

Callback Response #

Returns a boolean value if the credentials are valid, otherwise returns an error.

Usage #

// Using callbacks (node.js or browser)
kuzzle.security.validateCredentials('local', 'kuid', {'username': 'foo'}, function (error, result) {
});
// Using promises (node.js)
kuzzle
  .security
  .validateCredentialsPromise('local', 'kuid', {'username': 'foo'})
  .then(() => {
  });

Callback response

true