this is what I am doing
I make a first call to get the token
$client->request('POST', '/api/login_check', [], [],
['CONTENT_TYPE' => 'application/json'],
json_encode(
[
"username" => $user->getUsername(),
"password" => 'password',
]
)
);
$response = $client->getResponse();
return json_decode($response->getContent())->token;
then a second one to use it
$client->request('GET', '/api/my_endpoint', [], [], [
'headers' => [
'Authorization' => $token
]
]);
$token is a valid token (tested using postman) like 'Bearer SUPERLONGSTRING' but I am getting the error message
JWT Token not found
thanks