Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refreshing token is tedious as API response does not contain a new refresh token #29

Open
Berdir opened this issue Oct 7, 2020 · 1 comment

Comments

@Berdir
Copy link

Berdir commented Oct 7, 2020

While implementing the refresh functionality, I realized that the updated AccessToken object doesn't contain a new access result, and since there is no setter on that, you have to extract the values and re-create it yourself. Would be nice if the API could handle that:

      $options = $this->bynderConfiguration->getToken()->jsonSerialize();
      if (empty($data['refresh_token'])) {
        $options['refresh_token'] = $oldToken->getRefreshToken();
      }

      $newToken = new AccessToken($options);
@ConstantBqt
Copy link
Contributor

I guess we can now close this issue as it’s been fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants