genericoauth

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: 11 Imported by: 0

Documentation

Index

Constants

View Source
const ProviderName = "oauth"

Variables

This section is empty.

Functions

func NewScopeVerifier

func NewScopeVerifier(
	scope string,
) verifier.Verifier

Types

type ConfigOverride

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

type GenericOAuthToken

type GenericOAuthToken struct {
	Scopes []string `json:"scope"`
}

type GenericTeamProvider

type GenericTeamProvider struct{}

func (GenericTeamProvider) ProviderConfigured

func (GenericTeamProvider) ProviderConfigured(team db.Team) bool

func (GenericTeamProvider) ProviderConstructor

func (GenericTeamProvider) ProviderConstructor(
	team db.SavedTeam,
	redirectURL string,
) (provider.Provider, bool)

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

type ScopeVerifier

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

func (ScopeVerifier) Verify

func (verifier ScopeVerifier) Verify(logger lager.Logger, httpClient *http.Client) (bool, error)

Jump to

Keyboard shortcuts

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