Versions in this module Expand all Collapse all v0 v0.9.1 Mar 14, 2017 Changes in this version + var ErrMissingCode = errors.New("Missing authorization code.") + var ErrMissingRedirectURL = errors.New("Not sure where you were going.") + var ErrMissingState = errors.New("Something unexpected happened. Please try again.") + var ErrUnauthorized = errors.New("Unauthorized.") + func Handler(store store.Namer, auth Auther) http.Handler + func Middleware(store store.Namer, auth Auther) func(http.Handler) http.Handler + type Auther interface + Auth func(code string) (string, error) + OAuthConfig func() *oauth2.Config + func NewAuther(c Config) (Auther, error) + type Config struct + Config json.RawMessage + Type string + type GithubAuth struct + ClientID string + ClientSecret string + OrgID int + func (ga GithubAuth) Auth(code string) (string, error) + func (ga GithubAuth) OAuthConfig() *oauth2.Config + type GoogleAuth struct + func (ga *GoogleAuth) UnmarshalJSON(data []byte) error + func (ga GoogleAuth) Auth(code string) (string, error) + func (ga GoogleAuth) OAuthConfig() *oauth2.Config + type GoogleAuthConfig struct + Credentials json.RawMessage + EmailRegex string + type MockAuth struct + ClientID string + ClientSecret string + Err string + User string + func (ma MockAuth) Auth(_ string) (string, error) + func (ma MockAuth) OAuthConfig() *oauth2.Config