Skip to content

KeyAuth Middleware perhaps should return 500 when validator return an error #1846

Closed
@hyacinthus

Description

@hyacinthus
type KeyAuthValidator func(string, echo.Context) (bool, error)
  • token not found -> 400
  • validator return false -> 401
  • validator return error -> 500, or just return it to center error handler, it is 401 now
  • validator return true -> ok, next

Now I can't throw a ServerError when validate tokens.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions