parent
39ebac8aa4
commit
46591ba762
|
@ -147,9 +147,12 @@ func (c *Client) LoginV1() error {
|
||||||
}
|
}
|
||||||
|
|
||||||
token := resp.Header.Get(APIAuthHeaderKey)
|
token := resp.Header.Get(APIAuthHeaderKey)
|
||||||
if token == "" {
|
if token == "" && cfg.AccessToken == "" {
|
||||||
return fmt.Errorf("missing auth token from successful login")
|
return fmt.Errorf("missing auth token from successful login")
|
||||||
}
|
}
|
||||||
|
if cfg.AccessToken != "" {
|
||||||
|
token = cfg.AccessToken
|
||||||
|
}
|
||||||
c.v1client = v1.New(c.connectionURL, token, cfg.Config.DownloadToken)
|
c.v1client = v1.New(c.connectionURL, token, cfg.Config.DownloadToken)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue