Documentation ¶
Index ¶
- type CFAuthProxy
- type CFAuthProxyOption
- func WithAccessMiddleware(accessMiddleware func(http.Handler) *auth.AccessHandler) CFAuthProxyOption
- func WithAuthMiddleware(authMiddleware func(http.Handler) http.Handler) CFAuthProxyOption
- func WithCFAuthProxyBlock() CFAuthProxyOption
- func WithClientTLS(caCert, cert, key, cn string) CFAuthProxyOption
- func WithServerTLS(cert, key string) CFAuthProxyOption
- type QueryParser
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)