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.

DeleteMyCredentials #

Deletes the current user's credentials for the specified <strategy>. If the credentials that generated the current JWT are removed, the user will remain logged in until he logs out or his session expires, after that they will no longer be able to log in with the deleted credentials.

Arguments #

func (a *Auth) DeleteMyCredentials(strategy string, options types.QueryOptions) error
ArgumentsTypeDescriptionRequired
strategy
string
the strategy to useyes
options
QueryOptions
QueryOptions object containing query optionsyes

Options #

Additional query options

PropertyTypeDescriptionDefault
Queuable
bool
Make this request queuable or nottrue

Return #

Return an error or nil if the credentials are successfully deleted

Usage #

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