class OmniAuth::Strategies::Neteasy

Public Instance Methods

authorize_params() click to toggle source

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.

Calls superclass method
# File lib/omniauth/strategies/neteasy.rb, line 50
def authorize_params
  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() click to toggle source

api.t.163.com/users/show.json?oauth_token=6df96bf00f4cdd2a90c1df7077ae698a

# File lib/omniauth/strategies/neteasy.rb, line 39
def raw_info
  access_token.options[:mode] = :query
  access_token.options[:param_name] = 'access_token'
  @raw_info ||= access_token.get("/users/show.json").parsed
end