www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Any library with OAuth support?

reply "ilya-stromberg" <ilya-stromberg-2009 yandex.ru> writes:
Do you know any library with OAuth support?
Jan 22 2014
next sibling parent reply "Rikki Cattermole" <alphaglosined gmail.com> writes:
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
parent "ilya-stromberg" <ilya-stromberg-2009 yandex.ru> writes:
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:
 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
Yes, it will be great.
Jan 29 2014
prev sibling parent reply "Adam D. Ruppe" <destructionator gmail.com> writes:
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
parent reply "ilya-stromberg" <ilya-stromberg-2009 yandex.ru> writes:
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 know any library with OAuth support?
I did one extremely biased toward what I needed to do:
Do you have OAuth server implementation?
Jan 22 2014
parent "Adam D. Ruppe" <destructionator gmail.com> writes:
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