oauth

package
v0.0.0-...-0bd2313 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GitHub

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

func NewOAutherGitHub

func NewOAutherGitHub(dx githubDependencies) *GitHub

func (*GitHub) Config

func (g *GitHub) Config() *oauth2.Config

func (*GitHub) FetchData

func (g *GitHub) FetchData(_ context.Context, token string) (*session.OAuthSignRequest, error)

type Google

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

func NewOAutherGoogle

func NewOAutherGoogle(dx googleDependencies) *Google

func (*Google) Config

func (g *Google) Config() *oauth2.Config

func (*Google) FetchData

func (g *Google) FetchData(_ context.Context, token string) (*session.OAuthSignRequest, error)

type LinkedIn

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

func NewOAutherLinkedIn

func NewOAutherLinkedIn(dx linkedinDependencies) *LinkedIn

func (*LinkedIn) Config

func (l *LinkedIn) Config() *oauth2.Config

func (*LinkedIn) FetchData

func (l *LinkedIn) FetchData(ctx context.Context, token string) (*session.OAuthSignRequest, error)

func (*LinkedIn) GetEmail

func (l *LinkedIn) GetEmail(_ context.Context, token string) (string, error)

type Nop

type Nop struct{}

func NewOAutherNop

func NewOAutherNop() *Nop

func (*Nop) Config

func (n *Nop) Config() *oauth2.Config

func (*Nop) FetchData

func (n *Nop) FetchData(_ context.Context, token string) (*session.OAuthSignRequest, error)

type OAuthProviderType

type OAuthProviderType int
const (
	UnknownType OAuthProviderType = iota
	GoogleType
	GitHubType
	LinkedInType
)

func (OAuthProviderType) String

func (t OAuthProviderType) String() string

type OAuther

type OAuther interface {
	Config() *oauth2.Config
	FetchData(ctx context.Context, token string) (*session.OAuthSignRequest, error)
}

type Provider

type Provider interface {
	OAuther(typ OAuthProviderType) OAuther
}

Jump to

Keyboard shortcuts

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