Merge branch 'pre_trustie_server' into trustie_server
This commit is contained in:
commit
65dba54a41
|
@ -1,6 +1,18 @@
|
||||||
class Oauth::AcgeController < Oauth::BaseController
|
class Oauth::AcgeController < Oauth::BaseController
|
||||||
include RegisterHelper
|
include RegisterHelper
|
||||||
|
|
||||||
|
def refer
|
||||||
|
uid = params['uid'].to_s.strip
|
||||||
|
tip_exception("uid不能为空") if uid.blank?
|
||||||
|
|
||||||
|
open_user = OpenUsers::Acge.find_by(uid: uid)
|
||||||
|
if open_user.present? && open_user.user.present?
|
||||||
|
render :json => {login: open_user.user.login}
|
||||||
|
else
|
||||||
|
render_not_found
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
begin
|
begin
|
||||||
uid = params['uid'].to_s.strip
|
uid = params['uid'].to_s.strip
|
||||||
|
|
|
@ -26,6 +26,7 @@ Rails.application.routes.draw do
|
||||||
get 'auth/failure', to: 'oauth/base#auth_failure'
|
get 'auth/failure', to: 'oauth/base#auth_failure'
|
||||||
get 'auth/cas/callback', to: 'oauth/cas#create'
|
get 'auth/cas/callback', to: 'oauth/cas#create'
|
||||||
get 'auth/acge/callback', to: "oauth/acge#create"
|
get 'auth/acge/callback', to: "oauth/acge#create"
|
||||||
|
get 'auth/acge/refer', to: "oauth/acge#refer"
|
||||||
get 'auth/:provider/callback', to: 'oauth/callbacks#create'
|
get 'auth/:provider/callback', to: 'oauth/callbacks#create'
|
||||||
|
|
||||||
get 'oauth/bind', to: 'oauth/educoder#bind'
|
get 'oauth/bind', to: 'oauth/educoder#bind'
|
||||||
|
|
Loading…
Reference in New Issue