BasicAuth returns an BasicAuth middleware. For valid credentials it calls the next handler. For missing or invalid credentials, it sends "401 - Unauthorized" response.
(fn BasicAuthValidator)
| 85 | // For valid credentials it calls the next handler. |
| 86 | // For missing or invalid credentials, it sends "401 - Unauthorized" response. |
| 87 | func BasicAuth(fn BasicAuthValidator) echo.MiddlewareFunc { |
| 88 | return BasicAuthWithConfig(BasicAuthConfig{Validator: fn}) |
| 89 | } |
| 90 | |
| 91 | // BasicAuthWithConfig returns an BasicAuthWithConfig middleware with config. |
| 92 | func BasicAuthWithConfig(config BasicAuthConfig) echo.MiddlewareFunc { |
searching dependent graphs…