mercredi 11 octobre 2017

laravel modify headers before authenticating (token based / api)

I have an api that used Dingo API. The current users therefore use a X-Api-Key header for authentication. I now want to switch to laravels implemented API system which requires an Authorization header.

Is it possible to tell laravel which header to use. Or preferrably: Is there a hook that I can use to modify the headers (e.g. copy the X-Api-Key header value into the Authorization header), before authentication takes place?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire