Versions in this module Expand all Collapse all v1 v1.54.4 Nov 23, 2020 Changes in this version + const AuthResponseTemplate + const RedirectLocalhostURL + const RedirectPublicSecureURL + const RedirectPublicURL + const RedirectURL + const TitleBarRedirectURL + var SharedOptions = []fs.Option + func Config(id, name string, m configmap.Mapper, oauthConfig *oauth2.Config, opt *Options) error + func Context(client *http.Client) context.Context + func GetToken(name string, m configmap.Mapper) (*oauth2.Token, error) + func PutToken(name string, m configmap.Mapper, token *oauth2.Token, newSection bool) error + type AuthResult struct + Code string + Description string + Err error + Form url.Values + HelpURL string + Name string + OK bool + func (ar *AuthResult) Error() string + type CheckAuthFn func(*oauth2.Config, *AuthResult) error + type Options struct + CheckAuth CheckAuthFn + NoOffline bool + OAuth2Opts []oauth2.AuthCodeOption + StateBlankOK bool + type Renew struct + func NewRenew(name string, ts *TokenSource, run func() error) *Renew + func (r *Renew) Invalidate() + func (r *Renew) Start() + func (r *Renew) Stop() + type TokenSource struct + func NewClient(name string, m configmap.Mapper, oauthConfig *oauth2.Config) (*http.Client, *TokenSource, error) + func NewClientWithBaseClient(name string, m configmap.Mapper, config *oauth2.Config, ...) (*http.Client, *TokenSource, error) + func (ts *TokenSource) Invalidate() + func (ts *TokenSource) OnExpiry() <-chan time.Time + func (ts *TokenSource) Token() (*oauth2.Token, error)