Module: TaobaoSDK::Rails::Controller::InstanceMethods
- Defined in:
- lib/taobaoSDK/rails/controller.rb
Instance Method Summary collapse
-
#after_authorize ⇒ Object
authorize 后的callback.
-
#authorize_error ⇒ Object
授权错误.
Instance Method Details
#after_authorize ⇒ Object
authorize 后的callback
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/taobaoSDK/rails/controller.rb', line 11 def logger.debug("code = #{params[:code]}") if params[:error].present? render :action => :authorize_error else res_json = TaobaoSDK::Session.token(params['code']) logger.debug res_json session[:taobao_access_token] = HashWithIndifferentAccess.new(res_json) redirect_to :root end end |
#authorize_error ⇒ Object
授权错误
24 |
# File 'lib/taobaoSDK/rails/controller.rb', line 24 def ; end |