···24// TODO:
25//func NewRefreshAuth(pdsHost, accountIdentifier, password string) (*RefreshAuth, error) {
2627-func (a *RefreshAuth) DoWithAuth(req *http.Request, c *http.Client) (*http.Response, error) {
28 req.Header.Set("Authorization", "Bearer "+a.AccessToken)
29 // XXX: check response. if it is 403, because access token is expired, then take a lock and do a refresh
30 // TODO: when doing a refresh request, copy at least the User-Agent header from httpReq, and re-use httpClient
31- return c.Do(httpReq)
32}
3334// updates the client with the new auth method
···49 }
5051 if out.Active != nil && *out.Active == false {
52- return nil, fmt.Errorf("account is disabled: %s", out.Status)
53 }
5455 ra := RefreshAuth{
···24// TODO:
25//func NewRefreshAuth(pdsHost, accountIdentifier, password string) (*RefreshAuth, error) {
2627+func (a *RefreshAuth) DoWithAuth(c *http.Client, req *http.Request) (*http.Response, error) {
28 req.Header.Set("Authorization", "Bearer "+a.AccessToken)
29 // XXX: check response. if it is 403, because access token is expired, then take a lock and do a refresh
30 // TODO: when doing a refresh request, copy at least the User-Agent header from httpReq, and re-use httpClient
31+ return c.Do(req)
32}
3334// updates the client with the new auth method
···49 }
5051 if out.Active != nil && *out.Active == false {
52+ return nil, fmt.Errorf("account is disabled: %v", out.Status)
53 }
5455 ra := RefreshAuth{