Any library with OAuth support?

Adam D. Ruppe destructionator at gmail.com
Wed Jan 22 07:37:32 PST 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


More information about the Digitalmars-d-learn mailing list