Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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.
Click to show internal directories.
Click to hide internal directories.