provider

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FacebookProvider

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

func (*FacebookProvider) AuthCodeURL

func (f *FacebookProvider) AuthCodeURL(state string) string

func (*FacebookProvider) ClientID

func (f *FacebookProvider) ClientID() string

func (*FacebookProvider) Exchange

func (f *FacebookProvider) Exchange(ctx context.Context, code string) (*oauth2.Token, error)

func (*FacebookProvider) Name

func (f *FacebookProvider) Name() string

func (*FacebookProvider) String

func (f *FacebookProvider) String() string

func (*FacebookProvider) User

func (f *FacebookProvider) User() (string, error)

type GithubProvider

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

func (*GithubProvider) AuthCodeURL

func (g *GithubProvider) AuthCodeURL(state string) string

func (*GithubProvider) ClientID

func (g *GithubProvider) ClientID() string

func (*GithubProvider) Exchange

func (g *GithubProvider) Exchange(ctx context.Context, code string) (*oauth2.Token, error)

func (*GithubProvider) Name

func (g *GithubProvider) Name() string

func (*GithubProvider) String

func (g *GithubProvider) String() string

func (*GithubProvider) User

func (g *GithubProvider) User() (string, error)

type GoogleProvider

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

func (*GoogleProvider) AuthCodeURL

func (g *GoogleProvider) AuthCodeURL(state string) string

func (*GoogleProvider) ClientID

func (g *GoogleProvider) ClientID() string

func (*GoogleProvider) Exchange

func (g *GoogleProvider) Exchange(ctx context.Context, code string) (*oauth2.Token, error)

func (*GoogleProvider) Name

func (g *GoogleProvider) Name() string

func (*GoogleProvider) String

func (g *GoogleProvider) String() string

func (*GoogleProvider) User

func (g *GoogleProvider) User() (string, error)

type Provider

type Provider interface {
	AuthCodeURL(state string) string
	User() (string, error)
	Exchange(ctx context.Context, code string) (*oauth2.Token, error)
	String() string
	Name() string
	ClientID() string
}

Provider is the interface every OAuth provider has to fulfill for being used within jwt-proxy

func NewFacebook

func NewFacebook(rootURI string, clientID string, clientSecret string, scopes []string) Provider

func NewGithub

func NewGithub(rootURI string, clientID string, clientSecret string, scopes []string) Provider

func NewGoogle

func NewGoogle(rootURI string, clientID string, clientSecret string, scopes []string) Provider

Jump to

Keyboard shortcuts

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