Help us shape the future of Go! Take the 2026 Go Developer Survey

oauth

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProviderRegistry

type ProviderRegistry struct {
	// contains filtered or unexported fields
}

func NewProviderRegistry

func NewProviderRegistry(cfg *config.Config) (*ProviderRegistry, error)

func (*ProviderRegistry) Endpoint

func (r *ProviderRegistry) Endpoint(providerID string) (oauth2.Endpoint, bool)

func (*ProviderRegistry) HTTPClient added in v0.1.1

func (r *ProviderRegistry) HTTPClient(providerID string) *http.Client

func (*ProviderRegistry) Register

func (r *ProviderRegistry) Register(providerID string, endpoint oauth2.Endpoint, fetcher UserInfoFetcher, client *http.Client)

func (*ProviderRegistry) UserInfo

func (r *ProviderRegistry) UserInfo(ctx context.Context, providerID string, token *oauth2.Token) (providerUserID, email string, err error)

type UserInfoFetcher

type UserInfoFetcher interface {
	FetchUser(ctx context.Context, token *oauth2.Token) (providerUserID, email string, err error)
}

Jump to

Keyboard shortcuts

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