authorizationheader

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2017 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MinimumRemainingValidity time.Duration = time.Second * 10

Functions

This section is empty.

Types

type AuthHeaderBuilder added in v0.19.0

type AuthHeaderBuilder interface {
	AddAuthHeader(request *http.Request, logger *log.Logger) error
}

type BasicAuthHeaderBuilder

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

func NewBasicAuthHeaderBuilder

func NewBasicAuthHeaderBuilder(username, password string) BasicAuthHeaderBuilder

func (BasicAuthHeaderBuilder) AddAuthHeader added in v0.17.2

func (hb BasicAuthHeaderBuilder) AddAuthHeader(request *http.Request, logger *log.Logger) error

type ClientTokenAuthHeaderBuilder

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

func NewClientTokenAuthHeaderBuilder

func NewClientTokenAuthHeaderBuilder(
	uaaURL,
	clientID,
	clientSecret string,
	disableSSLCertVerification bool,
	trustedCertPEM []byte,
) (*ClientTokenAuthHeaderBuilder, error)

func (*ClientTokenAuthHeaderBuilder) AddAuthHeader added in v0.17.2

func (hb *ClientTokenAuthHeaderBuilder) AddAuthHeader(request *http.Request, logger *log.Logger) error

type HTTPClient

type HTTPClient interface {
	Do(req *http.Request) (*http.Response, error)
}

type NoAuthHeaderBuilder added in v0.17.2

type NoAuthHeaderBuilder struct{}

func NewNoAuthHeaderBuilder added in v0.17.2

func NewNoAuthHeaderBuilder() NoAuthHeaderBuilder

func (NoAuthHeaderBuilder) AddAuthHeader added in v0.17.2

func (NoAuthHeaderBuilder) AddAuthHeader(request *http.Request, logger *log.Logger) error

type ObtainTokenResponse

type ObtainTokenResponse struct {
	Token            string `json:"access_token"`
	ExpiresInSeconds int    `json:"expires_in"`
}

type UserTokenAuthHeaderBuilder

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

func NewUserTokenAuthHeaderBuilder

func NewUserTokenAuthHeaderBuilder(
	uaaURL,
	clientID,
	clientSecret,
	username,
	password string,
	disableSSLCertVerification bool,
	trustedCertPEM []byte,
) (*UserTokenAuthHeaderBuilder, error)

func (*UserTokenAuthHeaderBuilder) AddAuthHeader added in v0.17.2

func (hb *UserTokenAuthHeaderBuilder) AddAuthHeader(request *http.Request, logger *log.Logger) error

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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