Versions in this module Expand all Collapse all v0 v0.0.1 Jun 13, 2023 Changes in this version + const AUTHENTICATED_MESSAGE + const CALLBACK_HOSTNAME + const CALLBACK_PATH + const CONFIG_KEY_OAUTH_TOKEN + const OAUTH_CLIENT_ID + const TIMEOUT_SECONDS + func GetAuthHeader(config configuration.Configuration) string + func GetOAuthToken(config configuration.Configuration) (*oauth2.Token, error) + func IsKnownOAuthEndpoint(endpoint string) bool + func OpenBrowser(authUrl string) + func RefreshToken(ctx context.Context, oauthConfig *oauth2.Config, token *oauth2.Token) (*oauth2.Token, error) + func ShutdownServer(server *http.Server) + type Authenticator interface + AddAuthenticationHeader func(request *http.Request) error + Authenticate func() error + IsSupported func() bool + func CreateAuthenticator(config configuration.Configuration, httpClient *http.Client) Authenticator + func NewOAuth2Authenticator(config configuration.Configuration, httpClient *http.Client) Authenticator + func NewOAuth2AuthenticatorWithCustomFuncs(config configuration.Configuration, httpClient *http.Client, ...) Authenticator + func NewOAuth2AuthenticatorWithOpts(config configuration.Configuration, opts ...OAuth2AuthenticatorOption) Authenticator + func NewTokenAuthenticator(tokenFunc func() string) Authenticator + type OAuth2AuthenticatorOption func(authenticator *oAuth2Authenticator) + func WithHttpClient(httpClient *http.Client) OAuth2AuthenticatorOption + func WithOpenBrowserFunc(openBrowserFunc func(string)) OAuth2AuthenticatorOption + func WithShutdownServerFunc(shutdownServerFunc func(server *http.Server)) OAuth2AuthenticatorOption + func WithTokenRefresherFunc(...) OAuth2AuthenticatorOption