authorizationheader

package
v0.16.1 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2017 License: Apache-2.0 Imports: 11 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

This section is empty.

Types

type BasicAuthHeaderBuilder

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

func NewBasicAuthHeaderBuilder

func NewBasicAuthHeaderBuilder(username, password string) BasicAuthHeaderBuilder

func (BasicAuthHeaderBuilder) Build

func (hb BasicAuthHeaderBuilder) Build(logger *log.Logger) (string, 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) Build

func (hb *ClientTokenAuthHeaderBuilder) Build(logger *log.Logger) (string, error)

type HTTPClient

type HTTPClient interface {
	Do(req *http.Request) (*http.Response, 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) Build

func (hb *UserTokenAuthHeaderBuilder) Build(logger *log.Logger) (string, error)

Jump to

Keyboard shortcuts

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