1
0
mirror of https://github.com/labstack/echo.git synced 2025-02-19 19:10:29 +02:00

Correcting the BasicAuth Method ()

Current method gives type error because `context` variable is not present. Adding the `c echo.Context` for resolving type error.
This commit is contained in:
Piyush Chauhan 2017-01-15 14:16:33 +10:00 committed by Vishal Rana
parent 736d153c29
commit 04a7fc65e3

@ -15,7 +15,7 @@ Basic auth middleware provides an HTTP basic authentication.
*Usage*
```go
e.Use(middleware.BasicAuth(func(username, password string) bool {
e.Use(middleware.BasicAuth(func(username, password string, c echo.Context) bool {
if username == "joe" && password == "secret" {
return true
}