MasoniteFramework / api

Masonite API package currently in development
MIT License
8 stars 4 forks source link

Fixed Authorization bearer support #17

Open nicolaipre opened 4 years ago

nicolaipre commented 4 years ago

API authentication does not seem to work properly.

Masonite prepends HTTP_ to headers as stated in https://docs.masoniteproject.com/v/v2.0/the-basics/requests#headers, but does not cover token bearers.

Requests with Authorization: Bearer <valid-token> returns "error": "token is invalid", even though token is valid.

This is a quick-fix to the problem.