Documentation
¶
Index ¶
- func Gzip(inner http.Handler) http.Handler
- func IncomingWebhookAuth(inner http.Handler) http.Handler
- func IsAdmin(next http.Handler) http.Handler
- func Logger(next http.Handler) http.Handler
- func MockAuth(inner http.Handler) http.Handler
- type Middleware
- func Auth(cfg config.AuthNConfig) Middleware
- func BasicAuth(cfg config.AuthNBasicConfig) Middleware
- func Cors(allowOrigin string) Middleware
- func Methods(methods ...string) Middleware
- func OpenIDConnectJWTAuth(cfg config.AuthNOIDCConfig) Middleware
- func ProxyAuth(cfg config.AuthNProxyConfig) Middleware
- func RateLimiting(name string, conf config.RateLimiting) Middleware
- func Tracing(nextRequestID func() string) Middleware
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IncomingWebhookAuth ¶
IncomingWebhookAuth is a middleware to checks HTTP request with API key of an incoming webhook
Types ¶
type Middleware ¶
Middleware function definition
func Auth ¶
func Auth(cfg config.AuthNConfig) Middleware
Auth is a middleware to authenticate HTTP request
func BasicAuth ¶
func BasicAuth(cfg config.AuthNBasicConfig) Middleware
BasicAuth is a middleware to checks HTTP request credentials from Basic AuthN method
func Cors ¶
func Cors(allowOrigin string) Middleware
Cors is a middleware to enabling CORS on HTTP requests
func Methods ¶
func Methods(methods ...string) Middleware
Methods is a middleware to check that the request use the correct HTTP method
func OpenIDConnectJWTAuth ¶
func OpenIDConnectJWTAuth(cfg config.AuthNOIDCConfig) Middleware
OpenIDConnectJWTAuth is a middleware to checks HTTP request with a valid JWT
func ProxyAuth ¶
func ProxyAuth(cfg config.AuthNProxyConfig) Middleware
ProxyAuth is a middleware to checks HTTP request credentials from proxied headers
func RateLimiting ¶
func RateLimiting(name string, conf config.RateLimiting) Middleware
RateLimiting is a middleware to limite usage of an endpoint
func Tracing ¶
func Tracing(nextRequestID func() string) Middleware
Tracing is a middleware to trace HTTP request