Skip to content

Commit e41374b

Browse files
AahilRafiqaldas
authored andcommitted
Update basic-auth.md
1 parent f938a8c commit e41374b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

website/docs/middleware/basic-auth.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Basic auth middleware provides an HTTP basic authentication.
1212
## Usage
1313

1414
```go
15-
e.Use(middleware.BasicAuth(func(username, password string, c *echo.Context) (bool, error) {
15+
e.Use(middleware.BasicAuth(func(c *echo.Context, username, password string) (bool, error) {
1616
// Be careful to use constant time comparison to prevent timing attacks
1717
if subtle.ConstantTimeCompare([]byte(username), []byte("joe")) == 1 &&
1818
subtle.ConstantTimeCompare([]byte(password), []byte("secret")) == 1 {

0 commit comments

Comments
 (0)