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

Expired token datasource failure #193

Closed
jimlambie opened this issue Jul 28, 2017 · 2 comments
Closed

Expired token datasource failure #193

jimlambie opened this issue Jul 28, 2017 · 2 comments
Assignees

Comments

@jimlambie
Copy link
Contributor

The API provider fails to handle the expired token message returned from API. API Wrapper handles this, Web however doesn't use API Wrapper for the communication with API.

10:19:08.738Z  INFO dadi-web: GET datasource "articles": http://127.0.0.1:8011/1.0/radio/articles?count=5&page=1&filter={}&fields={}&sort={} (module=remote)

[2017-07-28 11:19:08.956] [LOG]   { 'www-authenticate': 'Bearer, error="invalid_token", error_description="Invalid or expired access token"',
  'content-type': 'application/json',
  'content-length': '18',
  date: 'Fri, 28 Jul 2017 10:19:08 GMT',
  connection: 'keep-alive' }

10:19:08.957Z ERROR dadi-web: Unauthorized (401): http://127.0.0.1:8011/1.0/radio/articles?count=5&page=1&filter={}&fields={}&sort={} (module=dadi-api)

[2017-07-28 11:19:08.958] [LOG]   { Error: Datasource "articles" failed. Unauthorized (401): http://127.0.0.1:8011/1.0/radio/articles?count=5&page=1&filter={}&fields={}&sort={}
{"statusCode":401}
message: 'Datasource "articles" failed. Unauthorized (401): http://127.0.0.1:8011/1.0/radio/articles?count=5&page=1&filter={}&fields={}&sort={}\n{"statusCode":401}',
  remoteIp: '127.0.0.1',
  remotePort: 8011 }
@fra967
Copy link

fra967 commented Aug 1, 2017

I have just seen this issue with Web 1.10.5 and API 2.2.4. I thought is was applicable to Web 3.x only.

Are we sure there is no breaking change in API response to Web expired tokens, for older versions of Web?
(in which case, it may be more urgent, as we have already rolled out API 2.2.4)

How was this situation handled in Web 1.10.5?

@jimlambie
Copy link
Contributor Author

There have been no changes in API. All Web versions have the same problem, namely that communication with API is not done via API Wrapper.

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

No branches or pull requests

3 participants