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.

ValidateMyCredentials #

Validates the current user's credentials for the specified <strategy>. The result field is true if the provided credentials are valid; otherwise an error is triggered. This route does not actually create or modify the user credentials. The credentials to send will depend on the authentication plugin and authentication strategy.

Arguments #

Copied to clipboard!
func (a *Auth) ValidateMyCredentials(strategy string, credentials json.RawMessage, options types.QueryOptions) (bool, error)
Arguments Type Description
strategy
string
the strategy to use
credentials
string
the new credentials
options
QueryOptions
QueryOptions object containing query options

Options #

Additional query options

Property Type Description Default
Queuable
boolean
Make this request queuable or not true

Usage #

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