Versions in this module Expand all Collapse all v0 v0.11.0 Jan 19, 2023 v0.10.0 Sep 2, 2022 Changes in this version + type Config struct + OAuth OAuthConfig + Organization string + Session auth.SessionConfig + type Instance interface + GetName func() string + GetOrganization func() string + OAuthCallback func(ctx context.Context, state, code string) (*oauth2.Token, *github.User, error) + OAuthIsAuthenticated func(ctx context.Context, token *oauth2.Token) (*github.User, error) + OAuthLoginURL func() string + TokenFromCookie func(r *http.Request) (*oauth2.Token, error) + TokenToCookie func(token *oauth2.Token) (*http.Cookie, error) + func New(name string, options map[string]any) (Instance, error) + type MockInstance struct + func NewMockInstance(t NewMockInstanceT) *MockInstance + func (_m *MockInstance) GetName() string + func (_m *MockInstance) GetOrganization() string + func (_m *MockInstance) OAuthCallback(ctx context.Context, state string, code string) (*oauth2.Token, *github.User, error) + func (_m *MockInstance) OAuthIsAuthenticated(ctx context.Context, token *oauth2.Token) (*github.User, error) + func (_m *MockInstance) OAuthLoginURL() string + func (_m *MockInstance) TokenFromCookie(r *http.Request) (*oauth2.Token, error) + func (_m *MockInstance) TokenToCookie(token *oauth2.Token) (*http.Cookie, error) + type NewMockInstanceT interface + Cleanup func(func()) + type OAuthConfig struct + ClientID string + ClientSecret string + State string