authorization

package
v0.0.0-...-1ac4f16 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 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
}

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, proxy *httputil.ReverseProxy) 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

Directories

Path Synopsis
Code generated by mockery v1.0.0.
Code generated by mockery v1.0.0.

Jump to

Keyboard shortcuts

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