ttscoff/Slogger — pull request #154 by randomphrase (2013-05-19 19:11:39+00:00)
Title: Initial attempt at OAuth2 authentication

This is my initial attempt at an OAuth2 authentication system for plugins. The runkeeper plugin has been updated to show how to add support for it.

To use it, you need to update the runkeeper plugin with the client id and secret (available from the [web site](http://runkeeper.com/partner/applications)).

Then run auth.rb to perform the authentication. This opens a web browser window which should redirect to localhost:8080 when done. Meanwhile auth.rb is listening on 8080 for a web request, which it parses and proceses to get the user access token.

Currently the access token is printed out to the console - eventually this should update the plugin config automatically.

~/Library/Slogger $ ./auth.rb -o runkeeper -d
OAuth2 completed for RunkeeperLogger
Token is: (elided)
Refresh token is:

I am new to all this stuff (ruby and oauth) so constructive feedback definitely appreciated.