(token *oauth2.Token, appKey string)
| 140 | } |
| 141 | |
| 142 | func storedCredentialFromOAuthToken(token *oauth2.Token, appKey string) storedCredential { |
| 143 | credential := storedCredential{ |
| 144 | AccessToken: token.AccessToken, |
| 145 | RefreshToken: token.RefreshToken, |
| 146 | TokenType: token.Type(), |
| 147 | AppKey: appKey, |
| 148 | } |
| 149 | if !token.Expiry.IsZero() { |
| 150 | expiry := token.Expiry |
| 151 | credential.Expiry = &expiry |
| 152 | } |
| 153 | return credential |
| 154 | } |
| 155 | |
| 156 | func (c *storedCredential) oauthToken() *oauth2.Token { |
| 157 | token := &oauth2.Token{ |
no outgoing calls
no test coverage detected