Hey :)
I've been trying to think up a good way to skip authentication if a request has already been cached.
So for example, straight from the docs:
<?php
$connector = new WarehouseConnector;
$authenticator = $connector->getAccessToken();
// Use authenticator to authenticate your connector instance
$connector->authenticate($authenticator);
// Any request sent through this connector will now have authentication applied
$connector->send(new GetInventoryRequest);
If the GetInventoryRequest is cached, the request to fetch a new access token will still occur.
I will likely try and come up with a dirty hack for today to fix this for myself, but I'm wondering if there is a clean way to do this?
ie, have the authentication inside the Request so it only runs if needed
Hey :)
I've been trying to think up a good way to skip authentication if a request has already been cached.
So for example, straight from the docs:
If the GetInventoryRequest is cached, the request to fetch a new access token will still occur.
I will likely try and come up with a dirty hack for today to fix this for myself, but I'm wondering if there is a clean way to do this?
ie, have the authentication inside the Request so it only runs if needed