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

UpdateSelf #

Updates the current user object in Kuzzle.

Arguments #

func (a *Auth) UpdateSelf(data json.RawMessage, options types.QueryOptions) (*security.User, error)
ArgumentsTypeDescription
content
string
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 pointer to a security.User object and an error or nil

Usage #

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