authorizationheader

package
v0.0.0-...-fb356ce Latest Latest
Warning

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

Go to latest
Published: May 17, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MinimumRemainingValidity = time.Second * 10

Functions

This section is empty.

Types

type AuthHeaderBuilder

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

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

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

type NoAuthHeaderBuilder struct{}

func NewNoAuthHeaderBuilder

func NewNoAuthHeaderBuilder() NoAuthHeaderBuilder

func (NoAuthHeaderBuilder) AddAuthHeader

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

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