provider

package
v0.0.0-...-e99be67 Latest Latest
Warning

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

Go to latest
Published: May 4, 2017 License: Apache-2.0 Imports: 7 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)

Types

type AuthConfig

type AuthConfig interface {
	IsConfigured() bool
	Validate() error
	AuthMethod(oauthBaseURL string, teamName string) atc.AuthMethod
}

type AuthConfigs

type AuthConfigs map[string]AuthConfig

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(
	auth *json.RawMessage,
	providerName string,
	redirectURL string,
) (Provider, bool)

type TeamProvider

type TeamProvider interface {
	ProviderConstructor(AuthConfig, string) (Provider, bool)
	AddAuthGroup(*flags.Group) AuthConfig
	UnmarshalConfig(*json.RawMessage) (AuthConfig, error)
}

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
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