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

Implemented revoke token in RedditOAuthAgent #147

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

HeroesHannibal
Copy link

We implemented the revoke() function within the RedditOAuthAgent class. We've provided examples of how to revoke a token in the example files and we've written JUnit tests for the implemented functionality.

timochoy and others added 5 commits November 25, 2015 11:26
Added code to post to https://www.reddit.com/api/v1/revoke_token in
order to revoke the refresh_token or access_token depending on which is
required.
The creation of the builder in the revoke method was found to be
excessively long. It was extracted into a new method called
createBuilder to carry out the same task. The ExampleVotingRequest has
been run again to ensure that the functionality was unaffected.
@snkas
Copy link
Contributor

snkas commented Nov 30, 2015

Looks good in general, I don't have the time to pull and validate the method. Added small suggestion. Also add a test when the method fails and for the execution branches created by various input values?

@HeroesHannibal
Copy link
Author

Hey! Thanks for reviewing this. I've made the changes you requested. For the tests, there are only really two test cases here since the api itself only returns a 401 if client authentication was incorrect or 202 in every other case, even if the token is not valid, or if it was revoked multiple times.

In compliance with the instructor’s note to include a read me for the
TAs, pushing a txt document that outlines the enhancements we made for
this project.
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.

None yet

2 participants