dev_SaaS
hjm 6 years ago
commit 59e369f442

@ -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]}"

@ -33,11 +33,11 @@ RedmineApp::Application.routes.draw do ## oauth相关
match 'oauth/cb', to: 'oauth#test_callback', :via => :get
match 'oauth/userinfo', to: 'oauth#get_userinfo', :via => :get
match 'ecloud/ecloud_login', to: 'ecloud#ecloud_login_callback', :via => :get
match 'ecloud/bs_new', to: 'ecloud#bs_new', :via => :post
match 'ecloud/bs_edit', to: 'ecloud#bs_edit', :via => :post
match 'ecloud/ps_new', to: 'ecloud#ps_new', :via => :post
match 'ecloud/ps_edit', to: 'ecloud#ps_edit', :via => :post
get 'ecloud/ecloud_login', to: 'ecloud#ecloud_login_callback'
post 'ecloud/bs_new', to: 'ecloud#bs_new'
post 'ecloud/bs_edit', to: 'ecloud#bs_update'
post 'ecloud/ps_new', to: 'ecloud#ps_new'
post 'ecloud/ps_edit', to: 'ecloud#ps_update'
resources :ec_course_evaluations do

Loading…
Cancel
Save