cfauthproxy

package
v2.3.1+incompatible Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTransportWithRootCA

func NewTransportWithRootCA(rootCACertPool *x509.CertPool) *http.Transport

Types

type CFAuthProxy

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

func NewCFAuthProxy

func NewCFAuthProxy(gatewayAddr, addr, certPath, keyPath string, proxyCACertPool *x509.CertPool, opts ...CFAuthProxyOption) *CFAuthProxy

func (*CFAuthProxy) Addr

func (p *CFAuthProxy) Addr() string

Addr returns the listener address. This must be called after calling Start.

func (*CFAuthProxy) Start

func (p *CFAuthProxy) Start()

Start starts the HTTP listener and serves the HTTP server. If the CFAuthProxy was initialized with the WithCFAuthProxyBlock option this method will block.

type CFAuthProxyOption

type CFAuthProxyOption func(*CFAuthProxy)

CFAuthProxyOption configures a CFAuthProxy

func WithAccessMiddleware

func WithAccessMiddleware(accessMiddleware func(http.Handler) *auth.AccessHandler) CFAuthProxyOption

func WithAuthMiddleware

func WithAuthMiddleware(authMiddleware func(http.Handler) http.Handler) CFAuthProxyOption

WithAuthMiddleware returns a CFAuthProxyOption that sets the CFAuthProxy's authentication and authorization middleware.

func WithCFAuthProxyBlock

func WithCFAuthProxyBlock() CFAuthProxyOption

WithCFAuthProxyBlock returns a CFAuthProxyOption that determines if Start launches a go-routine or not. It defaults to launching a go-routine. If this is set, start will block on serving the HTTP endpoint.

Jump to

Keyboard shortcuts

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