providers

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthProvider

type AuthProvider interface {
	GetLoginURL(redirectURI, state string) string
	Exchange(redirectURI, code string) (*Identity, error)
	ExchangeIDToken(rawIdToken string) (*Identity, error)
	IsInteractive() bool
}

func NewGitHubProvider

func NewGitHubProvider(c *config.Provider) (AuthProvider, error)

func NewProvider

func NewProvider(c *config.Provider) (AuthProvider, error)

type GitHubProvider

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

func (*GitHubProvider) Exchange

func (p *GitHubProvider) Exchange(redirectURI, code string) (*Identity, error)

func (*GitHubProvider) ExchangeIDToken added in v0.2.0

func (p *GitHubProvider) ExchangeIDToken(rawIdToken string) (*Identity, error)

func (*GitHubProvider) GetLoginURL

func (p *GitHubProvider) GetLoginURL(redirectURI, state string) string

func (*GitHubProvider) IsInteractive added in v0.2.0

func (p *GitHubProvider) IsInteractive() bool

type Identity

type Identity struct {
	UserID   string
	Username string
	Email    string
	Attr     map[string]interface{}
}

type OIDCProvider

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

func NewOIDCProvider

func NewOIDCProvider(c *config.Provider) (*OIDCProvider, error)

func (*OIDCProvider) Exchange

func (p *OIDCProvider) Exchange(redirectURI, code string) (*Identity, error)

func (*OIDCProvider) ExchangeIDToken added in v0.2.0

func (p *OIDCProvider) ExchangeIDToken(rawIdToken string) (*Identity, error)

func (*OIDCProvider) GetLoginURL

func (p *OIDCProvider) GetLoginURL(redirectURI, state string) string

func (*OIDCProvider) IsInteractive added in v0.2.0

func (p *OIDCProvider) IsInteractive() bool

Jump to

Keyboard shortcuts

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