SDK
SDK Golang v2.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.

UpdateMyCredentials #

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

Arguments #

func (a *Auth) UpdateMyCredentials(strategy string, credentials json.RawMessage, options types.QueryOptions) (json.RawMessage, error)
ArgumentsTypeDescription
strategy
string
the strategy to use
credentials
json.RawMessage
the new credentials
options
QueryOptions
QueryOptions object containing query options

Options #

Additional query options

PropertyTypeDescriptionDefault
Queuable
bool
Make this request queuable or nottrue

Return #

A JSON representing the new credentials and an error or nil.

Usage #

kuzzle.Auth.Login("local", json.RawMessage("{\"username\":\"foo\",\"password\":\"bar\"}"), nil)
_, err := kuzzle.Auth.UpdateMyCredentials("local", json.RawMessage("{\"username\":\"foo\",\"password\":\"bar\",\"other\":\"value\"}"), nil)
if err != nil {
  log.Fatal(err)
} else {
  fmt.Println("Success")
}