Documentation
¶
Overview ¶
Package github implements theauth.Provider against GitHub's OAuth 2.0 endpoints. Import this package only when you want GitHub sign-in; the root theauth package has no hard dependency on it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
ClientID string
ClientSecret string
Scopes []string
// Endpoint overrides for tests / GitHub Enterprise. Leave empty in
// production to hit github.com directly.
AuthorizeURL string
TokenURL string
UserURL string
EmailsURL string
// HTTPClient lets callers inject a custom client (timeouts, transport
// instrumentation, proxy). Defaults to a fresh client with httpTimeout.
HTTPClient *http.Client
}
Config is the provider's wiring. ClientID + ClientSecret are required; everything else has a sensible default. Scopes default to read:user + user:email when nil.