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

Feature/accept oauth token #12

Closed
wants to merge 1 commit into from
Closed

Feature/accept oauth token #12

wants to merge 1 commit into from

Conversation

soopa
Copy link

@soopa soopa commented Jan 19, 2011

Allows use of an OAuth access token for authenticated API requests.

Usage: Octokit::Client.new(:login => 'login', :oauth_token => 'oauth_token')

Includes one simple test. I figure these will be clobbered by the 'rspec' branch soon.

 - Pass `login` & `oauth_token` to Client.new to authenticate request

 - Prioritize basic authentication over OAuth if API `token` is provided

 - Include basic test of authenticated request
@sferik
Copy link
Member

sferik commented Jan 19, 2011

I'll make sure to merge this into the rspec branch and add specs.

@soopa
Copy link
Author

soopa commented Jan 19, 2011

Cool. Here's a feature branch on top of your latest from the rspec branch:
https://github.com/soopa/octokit/commits/feature/accept_oauth_token_rspec

I omitted the unit test in this branch. All specs passing.

@sferik
Copy link
Member

sferik commented Jan 19, 2011

Thanks for adding this. Just pulled in it.

@soopa
Copy link
Author

soopa commented Jan 19, 2011

Sweet; thanks for Octokit. Loving the new API (and name).

A note for when you're adding tests (which you may already know): Not all things are equal between OAuth & Token Auth. Namely, user & deploy keys can't be accessed or modified by requests authenticated with OAuth.

@sferik
Copy link
Member

sferik commented Jan 19, 2011

Thanks for the reminder. I think that's why I only bothered implementing basic auth in the first place, but I'm happy to have OAuth as an alternative for those who want it.

catsby added a commit that referenced this pull request Nov 8, 2011
koraktor pushed a commit to koraktor/octokit that referenced this pull request Nov 25, 2011
Update specs; Add spec for closed issue, since it includes the
"closed_at" field

Closes octokit#12
This pull request was closed.
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