Use single character as receiver
@@ -29,15 +29,14 @@ func NewUaaClient(c *http.Client, address, id, secret string) uaaClient {
}
}
-// TODO rename client receiver to c
-func (client *uaaClient) GetAuthData(token string) (*AuthData, error) {
+func (c *uaaClient) GetAuthData(token string) (*AuthData, error) {
formValues := url.Values{"token": []string{token}}
- req, _ := http.NewRequest("POST", client.address+"/check_token", strings.NewReader(formValues.Encode()))
- req.SetBasicAuth(client.id, client.secret)
+ req, _ := http.NewRequest("POST", c.address+"/check_token", strings.NewReader(formValues.Encode()))
+ req.SetBasicAuth(c.id, c.secret)
req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
- response, err := client.httpClient.Do(req)
+ response, err := c.httpClient.Do(req)
if err != nil {
return nil, err
}
