You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When setAccessToken is called on the RequestHandler, it stores the token and instantiates a new Client.
If Client has been configured elsewhere and passed to the NordigenClient, the custom config is lost when this happens.
The RequestHandleTrait should instead pass an Authorization header to each request, if one is present
To Reproduce
$client = newGuzzleHttp\Client();
$nordigen = newNordigen\NordigenPHP\API\NordigenClient($id, $key, $client);
$nordigen->setAccessToken('stored-token');
// now, $nordigen->requestHandler->httpClient is no longer the $client we passed
Expected behavior $requestHandler->httpClient should be preserved and have an extra Authorization header passed if accessToken is set.
Additional context
I have a PR ready, I'll submit it shortl.
The text was updated successfully, but these errors were encountered:
Describe the bug
When
setAccessToken
is called on theRequestHandler
, it stores the token and instantiates a newClient
.If
Client
has been configured elsewhere and passed to theNordigenClient
, the custom config is lost when this happens.The
RequestHandleTrait
should instead pass an Authorization header to each request, if one is presentTo Reproduce
Expected behavior
$requestHandler->httpClient
should be preserved and have an extraAuthorization
header passed ifaccessToken
is set.Additional context
I have a PR ready, I'll submit it shortl.
The text was updated successfully, but these errors were encountered: