We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
e := echo.New() authGroup := e.Group("/v1") authGroup.Use(middleware.KeyAuth(func(key string, c echo.Context) (bool, error) { user := api.service.CheckUser(key) // checks if user with "key" exists into db if user != nil { api.user = user return true, nil } err := fmt.Errorf("Invalid auth key: %s", key) log.Error(err) return false, err }))
Expected behaviour on failed KeyAuth check – HTTP 401 Unauthorized But Echo returns HTTP 500 Internal server error.
Do I do something wrong? Or it is an issue, that needed improvement/fix?
The text was updated successfully, but these errors were encountered:
Any updates?
Sorry, something went wrong.
842fc87
vishr
No branches or pull requests
Expected behaviour on failed KeyAuth check – HTTP 401 Unauthorized
But Echo returns HTTP 500 Internal server error.
Do I do something wrong?
Or it is an issue, that needed improvement/fix?
The text was updated successfully, but these errors were encountered: