Documentation
¶
Overview ¶
Package gitlab implements theauth.Provider against GitLab's OpenID Connect endpoints. The BaseURL option allows self-hosted GitLab instances; leave it empty to use gitlab.com. Import this package only when you want GitLab sign-in; the root theauth package has no hard dependency on it.
References: https://docs.gitlab.com/ee/api/oauth2.html https://docs.gitlab.com/ee/integration/openid_connect_provider.html
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
ClientID string
ClientSecret string
// BaseURL is the root of the GitLab instance. Defaults to https://gitlab.com.
// For self-hosted installations set this to e.g. https://git.example.com.
BaseURL string
Scopes []string
// Endpoint overrides for tests. These override BaseURL-derived URLs when set.
AuthorizeURL string
TokenURL string
UserInfoURL string
HTTPClient *http.Client
}
Config is the provider wiring. ClientID + ClientSecret are required. Set BaseURL to point at a self-hosted GitLab instance, e.g. "https://git.company.internal". Defaults to "https://gitlab.com".