Skip to content

Commit

Permalink
Merge pull request #535 from ufssf/mixiStrategyFix
Browse files Browse the repository at this point in the history
Fix mixi strategy
  • Loading branch information
Michael Bleigh committed Nov 6, 2011
2 parents 15b3492 + bb9df62 commit d1e5b8a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions oa-oauth/lib/omniauth/strategies/oauth2/mixi.rb
Expand Up @@ -23,7 +23,9 @@ def auth_hash
super, {
'uid' => user_data['entry']['id'],
'user_info' => user_info,
'credentials' => {'refresh_token' => @access_token.refresh_token},
'credentials' => {'refresh_token' => @access_token.refresh_token,
'expires_in' => @access_token.expires_in
},
'extra' => {
'user_hash' => user_data['entry'],
},
Expand All @@ -32,10 +34,12 @@ def auth_hash
end

def user_data
@access_token.options[:mode] = :query
@access_token.options[:param_name] = 'oauth_token'
@data ||= MultiJson.decode(@access_token.get(
'http://api.mixi-platform.com/2/people/@me/@self',
{'oauth_token' => @access_token.token}
))
).body)
end

def request_phase
Expand Down

0 comments on commit d1e5b8a

Please sign in to comment.