-
Notifications
You must be signed in to change notification settings - Fork 12
Header key always authenticates #86
Comments
One way to navigate around this is to specify the Validator in the
but that hardcodes the password in the function (what is then the ContextKey used for?). This is what I would have expected to be the default behavior. |
Other example https://github.com/gofiber/recipes/blob/8c1ea524846b14753a9e2a9f9eda040f25f7330c/fiber-envoy-extauthz/authz/main.go @jozsefsallai can you support here |
Thank you for pointing me to the example. |
sure |
@DavZim More on request context locals: https://docs.gofiber.io/api/ctx#locals |
Also @ReneWerner87, I think |
@ReneWerner87 I think this can be closed now that #90 was merged. |
I am new to GO and gofiber, so please forgive me when this is trivial or wrong.
I am using keyauth to have authentication via an API key in the header but it seems that keyauth does not accept the key - even worse, it seems to accept all keys.
For example, when I want to secure the API with the key
CORRECT-KEY
, I would use the followingWhen I run the following commands from curl, I get the following results
Did I misunderstood the way keyauth is supposed to be used (ie I misconfigured it) or is this a bug?
The same thing happens when I use
"cookie:access_token"
, it also accepts all tokens/keys.The text was updated successfully, but these errors were encountered: