Class: OmniAuth::Strategies::Neteasy
- Inherits:
-
OAuth2
- Object
- OAuth2
- OmniAuth::Strategies::Neteasy
- Defined in:
- lib/omniauth/strategies/neteasy.rb
Instance Method Summary collapse
-
#authorize_params ⇒ Object
You can pass
display
,with_offical_account
orstate
params to the auth request, if you need to set them dynamically. - #raw_info ⇒ Object
Instance Method Details
#authorize_params ⇒ Object
You can pass display
, with_offical_account
or state
params to the auth request, if you need to set them dynamically. You can also set these options in the OmniAuth config :authorize_params option.
50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/omniauth/strategies/neteasy.rb', line 50 def super.tap do |params| %w[display state].each do |v| if request.params[v] params[v.to_sym] = request.params[v] # to support omniauth-oauth2's auto csrf protection session['omniauth.state'] = params[:state] if v == 'state' end end end end |
#raw_info ⇒ Object
39 40 41 42 43 |
# File 'lib/omniauth/strategies/neteasy.rb', line 39 def raw_info access_token.[:mode] = :query access_token.[:param_name] = 'access_token' @raw_info ||= access_token.get("/users/show.json").parsed end |