Versions in this module Expand all Collapse all v0 v0.1.0 May 3, 2023 Changes in this version + func NewClient(config *oauth2.Config) client + type Agent struct + func NewAgent(config *Config, logger *logrus.Entry) *Agent + func (ga *Agent) GetLogin(r *http.Request, identifier AuthenticatedUserIdentifier) (string, error) + func (ga *Agent) HandleLogin(client OAuthClient, secure bool) http.HandlerFunc + func (ga *Agent) HandleLogout(client OAuthClient) http.HandlerFunc + func (ga *Agent) HandleRedirect(client OAuthClient, identifier AuthenticatedUserIdentifier, secure bool) http.HandlerFunc + type AuthenticatedUserIdentifier interface + LoginForRequester func(requester, token string) (string, error) + func NewAuthenticatedUserIdentifier(options *flagutil.GitHubOptions) AuthenticatedUserIdentifier + type Config struct + ClientID string + ClientSecret string + CookieStore *sessions.CookieStore + RedirectURL string + Scopes []string + func (c *Config) InitGitHubOAuthConfig(cookie *sessions.CookieStore) + type OAuthClient interface + AuthCodeURL func(state string, opts ...oauth2.AuthCodeOption) string + Exchange func(ctx context.Context, code string, opts ...oauth2.AuthCodeOption) (*oauth2.Token, error) + WithFinalRedirectURL func(url string) (OAuthClient, error)