OAuth2Client#refresh_access_token! should cause new client to be created #68

Merged
merged 1 commit into from Mar 19, 2012

Conversation

Projects
None yet
3 participants
@yaauie
Contributor

yaauie commented Mar 17, 2012

OAuth2Client#client continues to reference original token, even after refreshing. This patch deletes the cached @client so it will be regenerated on next request.

Note: Destructive action is wrapped in a Thread.exclusive to make the action thread-safe.

@yaauie

This comment has been minimized.

Show comment Hide comment
@yaauie

yaauie Mar 17, 2012

Contributor

I've manually tested this patch to ensure it works; since there is no YouTubeIt::OAuth2Client coverage at all, I don't have tokens to test with. If you generate the API tokens I'll gladly write test coverage for this case.

Contributor

yaauie commented Mar 17, 2012

I've manually tested this patch to ensure it works; since there is no YouTubeIt::OAuth2Client coverage at all, I don't have tokens to test with. If you generate the API tokens I'll gladly write test coverage for this case.

kylejginavan added a commit that referenced this pull request Mar 19, 2012

Merge pull request #68 from yaauie/oauth2-issues
OAuth2Client#refresh_access_token! should cause new client to be created

@kylejginavan kylejginavan merged commit 84457d0 into kylejginavan:master Mar 19, 2012

@chebyte

This comment has been minimized.

Show comment Hide comment
@chebyte

chebyte Mar 19, 2012

Collaborator

ey @yaauie I added the api tokens, this is in test/test_client.rb, so you are available for add the test for this case, when you want

thanks!

Collaborator

chebyte commented Mar 19, 2012

ey @yaauie I added the api tokens, this is in test/test_client.rb, so you are available for add the test for this case, when you want

thanks!

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