diff --git a/website/docs/middleware/basic-auth.md b/website/docs/middleware/basic-auth.md index 2afcda61..7ef34b01 100644 --- a/website/docs/middleware/basic-auth.md +++ b/website/docs/middleware/basic-auth.md @@ -12,7 +12,7 @@ Basic auth middleware provides an HTTP basic authentication. ## Usage ```go -e.Use(middleware.BasicAuth(func(username, password string, c *echo.Context) (bool, error) { +e.Use(middleware.BasicAuth(func(c *echo.Context, username, password string) (bool, error) { // Be careful to use constant time comparison to prevent timing attacks if subtle.ConstantTimeCompare([]byte(username), []byte("joe")) == 1 && subtle.ConstantTimeCompare([]byte(password), []byte("secret")) == 1 {