chore: align naming
This commit is contained in:
parent
bd40df16f2
commit
e508c62db9
1 changed files with 5 additions and 5 deletions
|
|
@ -61,14 +61,14 @@ func (v *Identity) Login(user, password string) (oauth2.TokenSource, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
var token oauth.Token
|
||||
if err := v.DoJSON(req, &token); err != nil {
|
||||
var tok oauth.Token
|
||||
if err := v.DoJSON(req, &tok); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
oauthToken := (*oauth2.Token)(&token)
|
||||
ts := oauth2.ReuseTokenSourceWithExpiry(oauthToken, oauth.RefreshTokenSource(oauthToken, v), 15*time.Minute)
|
||||
go oauth.Refresh(v.log, oauthToken, ts)
|
||||
token := (*oauth2.Token)(&tok)
|
||||
ts := oauth2.ReuseTokenSourceWithExpiry(token, oauth.RefreshTokenSource(token, v), 15*time.Minute)
|
||||
go oauth.Refresh(v.log, token, ts)
|
||||
|
||||
return ts, nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue