digitalmars.D.learn - Any library with OAuth support?
- ilya-stromberg (1/1) Jan 22 2014 Do you know any library with OAuth support?
- Rikki Cattermole (5/6) Jan 22 2014 Not currently.
- ilya-stromberg (3/9) Jan 29 2014 Yes, it will be great.
- Adam D. Ruppe (15/16) Jan 22 2014 I did one extremely biased toward what I needed to do:
- ilya-stromberg (3/7) Jan 22 2014 Do you have OAuth server implementation?
- Adam D. Ruppe (17/18) Jan 22 2014 Sort of:
Do you know any library with OAuth support?
Jan 22 2014
On Wednesday, 22 January 2014 at 11:14:22 UTC, ilya-stromberg wrote:Do you know any library with OAuth support?Not currently. But I can add it to my todo list for Cmsed[0]. [0] https://github.com/rikkimax/Cmsed
Jan 22 2014
On Wednesday, 22 January 2014 at 11:58:17 UTC, Rikki Cattermole wrote:On Wednesday, 22 January 2014 at 11:14:22 UTC, ilya-stromberg wrote:Yes, it will be great.Do you know any library with OAuth support?Not currently. But I can add it to my todo list for Cmsed[0]. [0] https://github.com/rikkimax/Cmsed
Jan 29 2014
On Wednesday, 22 January 2014 at 11:14:22 UTC, ilya-stromberg wrote:Do you know any library with OAuth support?I did one extremely biased toward what I needed to do: https://github.com/adamdruppe/misc-stuff-including-D-programming-language-web-stuff/blob/master/oauth.d also requires cgi.d and curl.d from my same repo. I believe this also uses the free library mhash so you'll need that installed on your system too. The basic way it works is you put the params into an struct. I already filled in twitter and some others. Then to get a token, you can call authorizeStepOne and later, authorizeStepTwo. Then use curlOauth with your tokens to do requests. At the bottom, there's also some signature checking things for doing an OAuth server. But since it is pretty well tied into my cgi.d and is written just for what I needed, it might be a pain to use...
Jan 22 2014
On Wednesday, 22 January 2014 at 14:54:00 UTC, Adam D. Ruppe wrote:On Wednesday, 22 January 2014 at 11:14:22 UTC, ilya-stromberg wrote:Do you have OAuth server implementation?Do you know any library with OAuth support?I did one extremely biased toward what I needed to do:
Jan 22 2014
On Wednesday, 22 January 2014 at 15:29:26 UTC, ilya-stromberg wrote:Do you have OAuth server implementation?Sort of: https://github.com/adamdruppe/misc-stuff-including-D-programming-language-web-stuff/blob/master/oauth.d#L448 I've never really used it, so it is probably buggy, but I'm pretty sure it covers the bases. Again, it uses my cgi.d, but only a few pieces: get current complete url, POST array, and authorization header, so probably not too hard to rip that out. The four functions are: isOAuthRequest /// true iff authorization is OAuth getApiKeyFromRequest // gets the user-provided api key (use to find the shared secret for the app in your database) getTokenFromRequest // gets the user-provided user token (again, get the shared secret, this time for the user) isSignatureValid // tests the provided signature against the other params
Jan 22 2014