go-fuego / fuego

Golang Fuego - web framework generating OpenAPI 3 spec from source code
https://go-fuego.github.io/fuego/
MIT License
932 stars 47 forks source link

Simpler authentication schemas #243

Closed DimShadoWWW closed 1 day ago

DimShadoWWW commented 2 days ago

I'm trying to use fuego to create an API that uses a header 'X-API-KEY' as access control with a funtion that validate its value and give or refuses access to a group of endpoints:

  securitySchemes:
    ApiKeyAuth:
      description: api key autentication
      in: header
      name: X-API-KEY
      type: apiKey

I could not find how to define it in fuego. Fuego can only use JWT autentication?

dylanhitt commented 2 days ago

I believe this can be related to #221. The associated PR is #226.

Would this satisfy your case?

DimShadoWWW commented 2 days ago

Yes, I think so

dylanhitt commented 1 day ago

Closing in favor of #226