oidc

package
v0.3.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const NoopEmail = ""

Variables

View Source
var (
	ErrNoVerifiedPrimaryEmail = errors.New("builder: no verified primary email found")
	ErrFailedFetchUser        = errors.New("builder: no failed to fetch user")
	ErrNotAllowedOrg          = errors.New("builder: user not in allowed org")
	ErrNoName                 = errors.New("builder: user has no display name set")
	ErrMissingIDToken         = errors.New("builder: 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{"email", "offline_access"}

DefaultScopes holds the default scopes used for GitHub.

Functions

func New

func New(url, clientID string, opts ...Opt) *oidcProvider

New creates a new GitHub provider.

Types

type Opt

type Opt func(*oidcProvider)

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