provider

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2024 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AggregationProviderInterface added in v0.4.2

type AggregationProviderInterface interface {
	ExtractProvider(OAuth2Provider) (ProviderInterface, error)
	Provider() OAuth2Provider
	Providers() []OAuth2Provider
}

type OAuth2Provider

type OAuth2Provider = string

type Oauth2Option

type Oauth2Option struct {
	ClientID     string
	ClientSecret string
	RedirectURL  string
}

type Provider added in v0.4.2

type Provider interface {
	Init(Oauth2Option)
	Provider() OAuth2Provider
}

type ProviderInterface

type ProviderInterface interface {
	Provider
	NewAuthURL(context.Context, string) (string, error)
	GetUserInfo(context.Context, string) (*UserInfo, error)
}

func ExtractProviders added in v0.4.2

func ExtractProviders(p AggregationProviderInterface, providers ...OAuth2Provider) ([]ProviderInterface, error)

type UserInfo

type UserInfo struct {
	Username       string
	ProviderUserID string
}

Jump to

Keyboard shortcuts

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