ghinstallation
ghinstallation copied to clipboard
Add oauth2.Token and TokenSource helpers.
This change doesn't change any behavior, but exposes helper functions for working with stdlib oauth2 types.
Adds a new OAuthToken func (we can't use Token without making a backwards incompatible change) that returns the token + expiry as a single struct. This helps ensure that getting the expiry can be done atomicly with getting the token.
Adds a new tokensource struct for implementing the oauth2.TokenSource interface, making it easier to use with additional clients.