ghinstallation icon indicating copy to clipboard operation
ghinstallation copied to clipboard

Add oauth2.Token and TokenSource helpers.

Open wlynch opened this issue 2 months ago • 0 comments

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.

wlynch avatar Oct 10 '25 16:10 wlynch