(userGUID string, oldPassword string, newPassword string)
| 163 | } |
| 164 | |
| 165 | func (client *Client) UpdatePassword(userGUID string, oldPassword string, newPassword string) error { |
| 166 | requestBody := map[string]interface{}{ |
| 167 | "oldPassword": oldPassword, |
| 168 | "password": newPassword, |
| 169 | } |
| 170 | |
| 171 | bodyBytes, err := json.Marshal(requestBody) |
| 172 | if err != nil { |
| 173 | return err |
| 174 | } |
| 175 | |
| 176 | request, err := client.newRequest(requestOptions{ |
| 177 | RequestName: internal.UpdatePasswordRequest, |
| 178 | Header: http.Header{"Content-Type": {"application/json"}}, |
| 179 | URIParams: map[string]string{"user_guid": userGUID}, |
| 180 | Body: bytes.NewBuffer(bodyBytes), |
| 181 | }) |
| 182 | if err != nil { |
| 183 | return err |
| 184 | } |
| 185 | |
| 186 | return client.connection.Make(request, &Response{}) |
| 187 | } |
| 188 | |
| 189 | func (client Client) ValidateClientUser(clientID string) error { |
| 190 | request, err := client.newRequest(requestOptions{ |
nothing calls this directly
no test coverage detected