authorization

package
v0.0.0-...-affaa53 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FactoryConfiguration

type FactoryConfiguration struct {
	OAuthClientTimeout int
}

FactoryConfiguration holds factory configuration options

type OAuthClient

type OAuthClient interface {
	// GetToken obtains OAuth token
	GetToken(clientID string, clientSecret string, authURL string) (string, apperrors.AppError)
	// InvalidateTokenCache resets internal token cache
	InvalidateTokenCache(clientID string)
}

type Strategy

type Strategy interface {
	// Adds Authorization header to the request
	AddAuthorization(r *http.Request, setter TransportSetter) apperrors.AppError
	// Invalidates internal state
	Invalidate()
}

type StrategyFactory

type StrategyFactory interface {
	// Creates strategy for credentials provided
	Create(credentials *metadatamodel.Credentials) Strategy
}

func NewStrategyFactory

func NewStrategyFactory(config FactoryConfiguration) StrategyFactory

NewStrategyFactory creates factory for instantiating Strategy implementations

type TransportSetter

type TransportSetter func(transport *http.Transport)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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