···2424// TODO:
2525//func NewRefreshAuth(pdsHost, accountIdentifier, password string) (*RefreshAuth, error) {
26262727-func (a *RefreshAuth) DoWithAuth(req *http.Request, c *http.Client) (*http.Response, error) {
2727+func (a *RefreshAuth) DoWithAuth(c *http.Client, req *http.Request) (*http.Response, error) {
2828 req.Header.Set("Authorization", "Bearer "+a.AccessToken)
2929 // XXX: check response. if it is 403, because access token is expired, then take a lock and do a refresh
3030 // TODO: when doing a refresh request, copy at least the User-Agent header from httpReq, and re-use httpClient
3131- return c.Do(httpReq)
3131+ return c.Do(req)
3232}
33333434// updates the client with the new auth method
···4949 }
50505151 if out.Active != nil && *out.Active == false {
5252- return nil, fmt.Errorf("account is disabled: %s", out.Status)
5252+ return nil, fmt.Errorf("account is disabled: %v", out.Status)
5353 }
54545555 ra := RefreshAuth{