provider

package
v0.0.0-...-7f11b89 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2017 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetProviders

func GetProviders() map[string]TeamProvider

func Register

func Register(providerName string, providerConstructor TeamProvider) error

Types

type OAuthClient

type OAuthClient interface {
	AuthCodeURL(string, ...oauth2.AuthCodeOption) string
	Exchange(context.Context, string) (*oauth2.Token, error)
	Client(context.Context, *oauth2.Token) *http.Client
}

type Provider

type Provider interface {
	PreTokenClient() (*http.Client, error)

	OAuthClient
	Verifier
}

func NewProvider

func NewProvider(
	team db.SavedTeam,
	providerName string,
	redirectURL string,
) (Provider, bool)

type TeamProvider

type TeamProvider interface {
	ProviderConstructor(db.SavedTeam, string) (Provider, bool)
	ProviderConfigured(db.Team) bool
}

If you can think of a better name, please change it

type Verifier

type Verifier interface {
	Verify(lager.Logger, *http.Client) (bool, error)
}

Directories

Path Synopsis
This file was generated by counterfeiter This file was generated by counterfeiter
This file was generated by counterfeiter This file was generated by counterfeiter

Jump to

Keyboard shortcuts

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