Skip to content

Commit

Permalink
added more information into raw_info
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasallan committed Dec 21, 2011
1 parent 01d9361 commit 003de99
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/omniauth-podio/version.rb
@@ -1,5 +1,5 @@
module Omniauth
module Podio
VERSION = "0.0.1alpha"
VERSION = "0.0.1"
end
end
24 changes: 20 additions & 4 deletions lib/omniauth/strategies/podio.rb
Expand Up @@ -4,14 +4,30 @@ module OmniAuth
module Strategies
class Podio < OmniAuth::Strategies::OAuth2
option :client_options, {
:site => 'https://api.podio.com/',
:authorize_url => 'https://podio.com/oauth/authorize'
}

:site => 'https://api.podio.com/',
:authorize_url => 'https://podio.com/oauth/authorize',
:token_url => "https://podio.com/oauth/token"
}

def request_phase
super
end

info do
{
:email => raw_info["mail"],
:user_id => raw_info["user_id"]

}
end

extra do
{:raw_info => raw_info}
end

def raw_info
@raw_info ||= MultiJson.decode(access_token.get('/user').body)
end
end
end
end

0 comments on commit 003de99

Please sign in to comment.