Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

OAuth 2.0 support #37

Closed
tmack8001 opened this Issue Aug 15, 2012 · 10 comments

Comments

Projects
None yet
6 participants

Is there any current plan to implement support for OAuth 2.0, I'm looking forward to using IO Docs on some of my future projects.

Contributor

hillct commented Aug 22, 2012

This would be very useful. In the meantime I'll likely use the 'key' auth method, requiring users of the ioDocs installation to acquire an access token as a separate step, but it would be very helpful to be able to perform an oauth2 authentication operation, to perform that token acquisition within ioDocs.

Presumably, such support would include basic login/bearer token support, as well as client credentials (2 legged oauth2) support, such that different API calls could be made to require one or the other generated access token.

For the moment, I don't have the bandwidth to implement this myself. I hope it's important/useful enough to others that someone will beat me to the implementation.

Yes, I hacked a similar thing into my iodocs where you acquire the access token some other way and supply it onto the form - and iodocs picks up an auth type of oauth2 and puts the token into the correct authorization header

Contributor

mansilladev commented Sep 26, 2012

@lornajane can you share your fork? (and maybe tell us if you built it against a specific draft spec of OAuth2)

I'm with @neil, that would be awesome.
On Sep 26, 2012 8:09 AM, "Neil Mansilla" notifications@github.com wrote:

@lornajane https://github.com/lornajane can you share your fork? (and
maybe tell us if you built it against a specific draft spec of OAuth2)


Reply to this email directly or view it on GitHubhttps://github.com/mashery/iodocs/issues/37#issuecomment-8887567.

Of course! Look here: https://github.com/lornajane/iodocs This version has some new API definitions, a nasty OAuth2 hack (set the auth to oauth2 and then it uses keyParam for what to put in the header) where you get the token elsewhere and paste it in - like an API key - and a way for the data to be sent as JSON (I added a sendFormat parameter to the API definitions).

It all diverged rather a lot from the original, and I have no node.js experience so it's probably a mess, but I can try to pull out the various pieces as pull requests if they would get merged (I saw the queue was rather long)

I have an initial working solution where you pass in the client id and
client secret to retrieve the oAuth2 token which then will be used by
iodocs. As I was making this for an internal infrastructure we were using
oAuth2 client-credential-flow as our authentication method. If we pull our
resources together we can probably find a much better solution which will
decompartmentalize some of my solution (will need to have additional
sources to connect with). I'm cleaning up the comments and variables
looking to post the solution in the next coming days to github (stay tuned).

Trevor Mack
(585) 563-9636 | http://trevor-mack.com | drummer8001@gmail.com

[image: Blog RSS] http://www.trevor-mack.com/feed [image:
Facebook]http://www.facebook.com/trevormack
[image: LinkedIn] http://www.linkedin.com/in/trevormack [image:
Twitter]http://www.twitter.com/tmack8001

On Wed, Sep 26, 2012 at 8:58 AM, Lorna Jane Mitchell <
notifications@github.com> wrote:

Of course! Look here: https://github.com/lornajane/iodocs This version
has some new API definitions, a nasty OAuth2 hack (set the auth to oauth2
and then it uses keyParam for what to put in the header) where you get the
token elsewhere and paste it in - like an API key - and a way for the data
to be sent as JSON (I added a sendFormat parameter to the API definitions).

It all diverged rather a lot from the original, and I have no node.js
experience so it's probably a mess, but I can try to pull out the various
pieces as pull requests if they would get merged (I saw the queue was
rather long)


Reply to this email directly or view it on GitHubhttps://github.com/mashery/iodocs/issues/37#issuecomment-8888783.

@tmack8001 can you share what you have so far? I'm just starting an iodocs project with oauth2 as well.

@PatrickHeneise I will try and get this out to github from an internal repo by COB today. Thanks for your interest.

UPDATE: unfortunately I was unable to get things out the door ... something about Public Release of internally written code :/ sorry everyone. Trying my best to push this out for you guys.

Sorry about the delay everyone ... the actual code I had written for that implementation is owned by my previous employer. I had put in a PR request prior to my departure, though they did not get it through.

For those that are waiting, I might be able to get to "re-implementing" this feature in the coming weeks. Since I am no longer at said prior company, I can't release the already working implementation ... bureaucracy is garbage which gets in the way of progressing the open source world!

Contributor

phairow commented Oct 10, 2014

looks like this was added a while back in #107. nice!

@phairow phairow closed this Oct 10, 2014

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