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
Arguments | Type | Description | Required |
---|---|---|---|
strategy | string | the strategy to use | yes |
options | QueryOptions | QueryOptions object containing query options | yes |
Options #
Additional query options
Property | Type | Description | Default |
---|---|---|---|
Queuable | bool | Make this request queuable or not | true |
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")
}
Edit this page on Github(opens new window)