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

Check the bearer token before talk client requests #73

Merged
merged 1 commit into from
Jan 24, 2018

Conversation

eatyourgreens
Copy link
Contributor

Share the beforeEveryRequest method between the API client and the Talk client.

Fixes zooniverse/Panoptes-Front-End#4179

Share the `beforeEveryRequest` method between the API client and the Talk client.
Copy link
Contributor

@camallen camallen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - though to me it was not obvious this is coupled to the underlying json-api-client behaviour to get called

@eatyourgreens
Copy link
Contributor Author

I only realised it existed by reading the Panoptes client code.

beforeEveryRequest: function() {
var auth = require('./auth');
return auth.checkBearerToken();
},

@eatyourgreens eatyourgreens merged commit e18e377 into master Jan 24, 2018
@eatyourgreens eatyourgreens deleted the talk-client-auth branch January 24, 2018 10:13
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

Successfully merging this pull request may close these issues.

2 participants