dex

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 29, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const NoopEmail = ""

Variables

View Source
var (
	ErrNoVerifiedPrimaryEmail = errors.New("goth: no verified primary email found")
	ErrFailedFetchUser        = errors.New("goth: no failed to fetch user")
	ErrNotAllowedOrg          = errors.New("goth: user not in allowed org")
	ErrNoName                 = errors.New("goth: user has no display name set")
	ErrMissingIDToken         = errors.New("goth: no id token found")
)
View Source
var DefaultClient = &http.Client{
	Transport: &http.Transport{
		MaxIdleConnsPerHost: 20,
	},
	Timeout: 10 * time.Second,
}

DefaultClient is the default HTTP client used. TODO: allows to configure the client via options.

View Source
var DefaultScopes = []string{"openid", "profile", "email", "offline_access"}

DefaultScopes holds the default scopes used for GitHub.

Functions

func New

func New(url, clientID, clientSecret, callbackURL string, opts ...Opt) *dexProvider

New creates a new GitHub provider.

Types

type Opt

type Opt func(*dexProvider)

Opt is a function that configures the GitHub provider.

func WithScopes

func WithScopes(scopes ...string) Opt

WithScopes sets the scopes for the GitHub provider.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL