Prevent Wayfair Plugin from thinking it's got an invalid auth token when in reality it has no auth token.
Prevent Wayfair Plugin from thinking a token is valid when the token is expired
Changes made
Stop the clearToken method from storing junk into the database - now will store an empty array as intended
Add timestamp immediately after we get the token data from Wayfair
Consider a token that still has 5 seconds before expiration to be unusable (as we probably put the timestamp on a bit late and it will be a bit of time before the token makes it to Wayfair).
repair getOAuthToken so that it actually returns the real token as a String, re-add that to the AuthContract interface.
Goals
Changes made
clearToken
method from storing junk into the database - now will store an empty array as intendedgetOAuthToken
so that it actually returns the real token as a String, re-add that to theAuthContract
interface.