Skip to content

Commit fab1a0e

Browse files
sasilevivishr
authored andcommitted
Update guide (#47)
change to match BasicAuthValidator API
1 parent 007b992 commit fab1a0e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

website/content/guide.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,11 +214,11 @@ e.Use(middleware.Recover())
214214

215215
// Group level middleware
216216
g := e.Group("/admin")
217-
g.Use(middleware.BasicAuth(func(username, password string, c echo.Context) (error, bool) {
217+
g.Use(middleware.BasicAuth(func(username, password string, c echo.Context) (bool, error) {
218218
if username == "joe" && password == "secret" {
219-
return nil, true
219+
return true, nil
220220
}
221-
return nil, false
221+
return false, nil
222222
}))
223223

224224
// Route level middleware

0 commit comments

Comments
 (0)