Skip to content

Conversation

@2rba
Copy link

@2rba 2rba commented Jul 24, 2014

Problem description: While access_token is refreshing the method RubyBox::Session.request is called twice with the same request param. That cause twice call of
request.add_field('Authorization', "Bearer #{@access_token.token}")
That lead to wrong header like authorization: Bearer oldaccess_token, Bearer newaccess_token
and failed auth

This fix assures there is no extra header (and also the same for the header As-User)

Copy link

Choose a reason for hiding this comment

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

You are calling the same code in both if branches. You can just put it above if statement.

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