mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-24 05:35:46 +08:00
fixed oauth2 请求区别
This commit is contained in:
@@ -248,7 +248,7 @@ class ApplicationController < ActionController::Base
|
|||||||
#return if params[:controller] == "main"
|
#return if params[:controller] == "main"
|
||||||
# Find the current user
|
# Find the current user
|
||||||
#Rails.logger.info("current_laboratory is #{current_laboratory} domain is #{request.subdomain}")
|
#Rails.logger.info("current_laboratory is #{current_laboratory} domain is #{request.subdomain}")
|
||||||
if request.headers["Authorization"].present?
|
if request.headers["Authorization"].present? && request.headers["Authorization"].start_with?('Bearer')
|
||||||
tip_exception(401, "请登录后再操作!") unless valid_doorkeeper_token?
|
tip_exception(401, "请登录后再操作!") unless valid_doorkeeper_token?
|
||||||
if @doorkeeper_token.present?
|
if @doorkeeper_token.present?
|
||||||
# client方法对接,需要一直带着用户标识uid
|
# client方法对接,需要一直带着用户标识uid
|
||||||
|
|||||||
Reference in New Issue
Block a user