package
0.0.0-20240630234109-2a8940cfaaf3
Repository: https://github.com/jkoelker/cotton.git
Documentation: pkg.go.dev

# Functions

No description provided by the author
LoadToken loads a token from a the reader.
New creates a new Auth instance.
NewCacheToken creates a new token from an oauth2.Token.
NewState generates a new random state string.
NewTokenSource creates a new TokenSource.
No description provided by the author
WithCacheFile sets the file to cache the token.
WithOAuth2ClientID sets the client ID.
WithOAuth2ClientSecret sets the client secret.
WithOAuth2Config sets the oauth2.Config.
WithOAuth2Endpoint sets the endpoint.
WithOAuth2EndpointAuthURL sets the auth URL.
WithOAuth2EndpointTokenURL sets the token URL.
WithOAuth2RedirectURL sets the redirect URL.
WithOutput sets the output writer.
No description provided by the author

# Variables

No description provided by the author

# Structs

Auth wraps the oauth2.Config and provides a method to get the and persist the token / refresh token.
CacheToken represents a token that is stored in the cache.
TokenSource wraps an oauth2.TokenSource and optionally caches the token to a file.