SDK
SDK Golang v3.x
2

CreateMyCredentials #

Creates the current user's credentials for the specified <strategy>.

Arguments #

func (a *Auth) CreateMyCredentials(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)
kuzzle.Auth.CreateMyCredentials("other", json.RawMessage("{\"username\":\"foo\",\"password\":\"bar\"}"), nil)
fmt.Println("Success")