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.AuthNConfig) Middleware
- func Cors(allowOrigin string) Middleware
- func Methods(methods ...string) Middleware
- func OpenIDConnectAuth(cfg config.AuthNConfig) Middleware
- func ProxyAuth(cfg config.AuthNConfig) 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.AuthNConfig) 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 OpenIDConnectAuth ¶ added in v1.2.0
func OpenIDConnectAuth(cfg config.AuthNConfig) Middleware
OpenIDConnectAuth is a middleware to checks HTTP request with a valid OIDC token
func ProxyAuth ¶
func ProxyAuth(cfg config.AuthNConfig) 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