MCPcopy Create free account
hub / github.com/dropbox/dbxcli / oauthToken

Method oauthToken

cmd/auth.go:156–166  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

154}
155
156func (c *storedCredential) oauthToken() *oauth2.Token {
157 token := &oauth2.Token{
158 AccessToken: c.AccessToken,
159 TokenType: c.TokenType,
160 RefreshToken: c.RefreshToken,
161 }
162 if c.Expiry != nil {
163 token.Expiry = *c.Expiry
164 }
165 return token
166}
167
168func (c *storedCredential) shouldRefresh(now time.Time) bool {
169 if c.RefreshToken == "" {

Callers 1

refreshStoredCredentialFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected