SDK
SDK C# v1.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.

UpdateMyCredentialsAsync #

Update the current user's credentials for the specified strategy. The credentials to send will depend on the authentication plugin and the authentication strategy.

Arguments #

public async Task<JObject> UpdateMyCredentialsAsync(
      string strategy,
      JObject credentials);
ArgumentTypeDescription
strategy
string
Strategy to use
credentials
JObject
JObject representing the credentials

Exceptions #

Throws a KuzzleException if there is an error. See how to handle error.

Return #

A JObject representing the updated credentials with the following properties:

PropertyTypeDescription
username
string
The Username
kuid
string
The user's kuid

Usage #

try {
  await kuzzle.Auth.LoginAsync(
    "local",
    JObject.Parse("{username: 'foo', password: 'bar'}"));
  JObject response = await kuzzle.Auth.UpdateMyCredentialsAsync(
    "local",
    JObject.Parse("{username: 'foo', password: 'bar'}"));
  Console.WriteLine(response.ToString(Formatting.None));
  /*
  {
    "username": "foo",
    "kuid": "foo"
  }
  */
  Console.WriteLine("Credentials successfully updated");
} catch (KuzzleException e) {
  Console.WriteLine(e);
}