|
|
|
@ -123,12 +123,6 @@ def load_user(user_id):
|
|
|
|
|
|
|
|
|
|
@lm.request_loader
|
|
|
|
|
def load_user_from_request(request):
|
|
|
|
|
auth_header = request.headers.get("Authorization")
|
|
|
|
|
if auth_header:
|
|
|
|
|
user = load_user_from_auth_header(auth_header)
|
|
|
|
|
if user:
|
|
|
|
|
return user
|
|
|
|
|
|
|
|
|
|
if config.config_allow_reverse_proxy_header_login:
|
|
|
|
|
rp_header_name = config.config_reverse_proxy_login_header_name
|
|
|
|
|
if rp_header_name:
|
|
|
|
@ -138,6 +132,12 @@ def load_user_from_request(request):
|
|
|
|
|
if user:
|
|
|
|
|
return user
|
|
|
|
|
|
|
|
|
|
auth_header = request.headers.get("Authorization")
|
|
|
|
|
if auth_header:
|
|
|
|
|
user = load_user_from_auth_header(auth_header)
|
|
|
|
|
if user:
|
|
|
|
|
return user
|
|
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|