mirror of
https://github.com/labstack/echo.git
synced 2025-02-19 19:10:29 +02:00
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.
This commit is contained in:
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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user