UpdateToken updates the token and refresh token information
(newToken, newRefreshToken string, expiry, refreshExpiry *time.Time)
| 63 | |
| 64 | // UpdateToken updates the token and refresh token information |
| 65 | func (conn *GithubConn) UpdateToken(newToken, newRefreshToken string, expiry, refreshExpiry *time.Time) { |
| 66 | conn.Token = newToken |
| 67 | conn.RefreshToken = newRefreshToken |
| 68 | conn.TokenExpiresAt = expiry |
| 69 | conn.RefreshTokenExpiresAt = refreshExpiry |
| 70 | |
| 71 | // Update the internal tokens slice used by SetupAuthentication |
| 72 | conn.tokens = []string{newToken} |
| 73 | conn.tokenIndex = 0 |
| 74 | } |
| 75 | |
| 76 | // PrepareApiClient splits Token to tokens for SetupAuthentication to utilize |
| 77 | func (conn *GithubConn) PrepareApiClient(apiClient plugin.ApiClient) errors.Error { |
no outgoing calls