Class: OmniAuth::Strategies::Mixi
- Inherits:
-
OAuth2
- Object
- OAuth2
- OmniAuth::Strategies::Mixi
- Defined in:
- lib/omniauth/strategies/mixi.rb
Constant Summary collapse
- MINIMUM_SCOPE =
'r_profile'
- BASIC_SCOPE =
([MINIMUM_SCOPE] + ['name', 'location', 'about_me'].map {|scope| "#{MINIMUM_SCOPE}_#{scope}" }).join(' ')
Instance Method Summary collapse
Instance Method Details
#authorize_params ⇒ Object
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/omniauth/strategies/mixi.rb', line 56 def super.tap do |params| %w[display state scope].each do |v| if request.params[v] params[v.to_sym] = request.params[v] session['omniauth.state'] = params[:state] if v == 'state' end end unless params[:scope] if [:info_level] == :min params[:scope] = MINIMUM_SCOPE else params[:scope] = BASIC_SCOPE end end end end |
#callback_url ⇒ Object
52 53 54 |
# File 'lib/omniauth/strategies/mixi.rb', line 52 def callback_url full_host + script_name + callback_path end |
#raw_info ⇒ Object
46 47 48 49 50 |
# File 'lib/omniauth/strategies/mixi.rb', line 46 def raw_info access_token.[:mode] = :header @raw_info ||= access_token.get('/2/people/@me/@self?fields=@all').parsed['entry'] end |