From e5252fa87ea18d48816cc300b1a0ed6a2741d1f8 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Tue, 12 Mar 2019 19:26:51 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E7=94=A8=E6=88=B7=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/ecloud_controller.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/controllers/ecloud_controller.rb b/app/controllers/ecloud_controller.rb index bd0170f9..47b0ca52 100644 --- a/app/controllers/ecloud_controller.rb +++ b/app/controllers/ecloud_controller.rb @@ -101,6 +101,9 @@ class EcloudController < ApplicationController def ecloud_login_callback #获取code logger.info "oauth2 login_callback: #{params}" + + raise "没有code" unless params[:code] + url = "#{SERVER_URL}/oauth2/authorization?grant_type=authorization_code" + "&client_id=#{CLIENT_ID}&scope=&redirect_uri=&code=#{params[:code]}"