SDK
SDK Android v3.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 #

JSONObject credentials = new JSONObject().put("username", "bar");
kuzzle.security.validateCredentials("local", "kuid", credentials, new ResponseListener<Boolean>() {
  @Override
  public void onSuccess(Boolean result) {
  }
  @Override
  public void onError(JSONObject error) {
    // Handle error
  }
}

Callback response

true