cfauthproxy

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CFAuthProxy

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

func NewCFAuthProxy

func NewCFAuthProxy(metricStoreAddr, addr, caPath string, log *logger.Logger, 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.

func WithClientTLS added in v1.2.1

func WithClientTLS(caCert, cert, key, cn string) CFAuthProxyOption

WithClientTLS will use client TLS cert and key for communication to the proxy destination.

func WithServerTLS added in v1.3.0

func WithServerTLS(cert, key string) CFAuthProxyOption

type QueryParser

type QueryParser struct{}

func (*QueryParser) ExtractSourceIds

func (q *QueryParser) ExtractSourceIds(query string) ([]string, error)

Jump to

Keyboard shortcuts

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