auth

package
v0.0.0-...-d17281b Latest Latest
Warning

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

Go to latest
Published: May 16, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

func NewManager

func NewManager(cfg *config.Config) (*Manager, error)

func (*Manager) Get

func (o *Manager) Get() (*Provider, error)

func (*Manager) GetConfig

func (o *Manager) GetConfig() *config.Config

func (*Manager) Load

func (o *Manager) Load(ctx context.Context) (*Provider, error)

func (*Manager) String

func (o *Manager) String() string

type Provider

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

func NewProvider

func NewProvider(ctx context.Context, cfg *config.Config) (*Provider, error)

func (*Provider) Exchange

func (o *Provider) Exchange(
	ctx context.Context,
	code string,
	opts ...oauth2.AuthCodeOption,
) (*oauth2.Token, error)

func (*Provider) GetAuthCodeURL

func (o *Provider) GetAuthCodeURL(
	ctx context.Context,
	state string,
	opts ...oauth2.AuthCodeOption,
) (string, error)

func (*Provider) UserInfo

func (o *Provider) UserInfo(
	ctx context.Context,
	tokenSource oauth2.TokenSource,
) (*oidc.UserInfo, error)

func (*Provider) Verify

func (o *Provider) Verify(
	ctx context.Context,
	rawIDToken string,
) (*oidc.IDToken, error)

Jump to

Keyboard shortcuts

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