oidc

package
v0.3.21 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2026 License: Apache-2.0 Imports: 14 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{"openid", "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 WithDiscovery added in v0.3.17

func WithDiscovery(discovery discovery.Client) Opt

WithDiscovery sets the discovery client for 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