From 04a7fc65e3b0b983166f5220a4c1c1a0ce23feab Mon Sep 17 00:00:00 2001 From: Piyush Chauhan Date: Sun, 15 Jan 2017 14:16:33 +1000 Subject: [PATCH] Correcting the BasicAuth Method (#822) Current method gives type error because `context` variable is not present. Adding the `c echo.Context` for resolving type error. --- website/content/middleware/basic-auth.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/content/middleware/basic-auth.md b/website/content/middleware/basic-auth.md index 0ee42865..e6379abc 100644 --- a/website/content/middleware/basic-auth.md +++ b/website/content/middleware/basic-auth.md @@ -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 }