I am using Laravel inbuilt Bearer token for API authentication. https://laravel.com/docs/5.8/api-authentication#passing-tokens-in-requests
$response = $client->request('POST', '/api/user', [
'headers' => [
'Authorization' => 'Bearer '.$token,
'Accept' => 'application/json',
],
]);
I would like to change the Authorization
header to X-API-Authorization
since we already have a legacy authentication in place which use this header Authorization
, which I have no control over.
Does Laravel provide over-riding this inbuilt functionality?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire