Skip to content

Commit

Permalink
chore: align naming
Browse files Browse the repository at this point in the history
  • Loading branch information
andig committed Jul 22, 2023
1 parent bd40df1 commit e508c62
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions vehicle/volvo/connected/identity.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit e508c62

Please sign in to comment.