genericoauth

package
v0.0.0-...-dbf52f0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2016 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const ProviderName = "oauth"

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigOverride

type ConfigOverride struct {
	oauth2.Config
	AuthURLParams map[string]string
}

type NoopVerifier

type NoopVerifier struct{}

func (NoopVerifier) Verify

func (v NoopVerifier) Verify(logger lager.Logger, client *http.Client) (bool, error)

type Provider

type Provider struct {
	verifier.Verifier
	Config ConfigOverride
}

func NewProvider

func NewProvider(
	genericOAuth *db.GenericOAuth,
	redirectURL string,
) Provider

func (Provider) AuthCodeURL

func (provider Provider) AuthCodeURL(state string, opts ...oauth2.AuthCodeOption) string

func (Provider) Client

func (provider Provider) Client(ctx context.Context, t *oauth2.Token) *http.Client

func (Provider) Exchange

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

func (Provider) PreTokenClient

func (Provider) PreTokenClient() (*http.Client, error)

Jump to

Keyboard shortcuts

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