Core
API v2.x
2

validateCredentials #

Checks if the provided credentials are well-formed. Does not actually save credentials.


Query Syntax #

HTTP #

URL: http://kuzzle:7512/credentials/<strategy>/<_id>/_validate
Method: POST
Body:
{
  // example for the "local" authentication strategy
  "username": "MyUser",
  "password": "MyPassword"
}

Other protocols #

{
  "controller": "security",
  "action": "validateCredentials",
  "strategy": "<strategy>",
  "_id": "<kuid>",
  "body": {
    // example for the "local" authentication strategy
    "username": "MyUser",
    "password": "MyPassword"
  }
}

Arguments #

  • _id: user kuid
  • strategy: authentication strategy

Body properties #

The properties that can be sent to validate credentials depend entirely of the authentication strategy.


Response #

Returns a boolean telling whether credentials are valid.

{
  "status": 200,
  "error": null,
  "action": "validateCredentials",
  "controller": "security",
  "_id": "<kuid>",
  "result": true
}