createCredentials

URL: http://kuzzle:7512/credentials/<strategy>/<kuid>/_create
Method: POST
Body

{
  "credentialField": "someValue",
  ...
}

// example with a "local" authentication
{
  "username": "MyUser",
  "password": "MyPassword"
}

Query

{
  "controller": "security",
  "action": "createCredentials",
  "strategy": "<strategy>",
  "_id": "<kuid>",
  "body": {
    "credentialField": "someValue"
  }
}
{
  "controller": "security",
  "action": "createCredentials",
  "strategy": "<strategy>",
  "_id": "<kuid>",
  "body": {
    "username": "MyUser",
    "password": "MyPassword"
  }
}

Response

// example with a "local" authentication

{
  "status": 200,
  "error": null,
  "action": "createCredentials",
  "controller": "security",
  "_id": "<kuid>",
  "result": {
    "username": "MyUser",
    "kuid": "<kuid>"
  }
}

Create credentials of the specified <strategy> for the user <kuid>. The credentials to send depends entirely on the authentication plugin and strategy you want to create credentials for.