mirror of
https://github.com/dkmstr/openuds.git
synced 2025-01-26 10:03:50 +03:00
fixed SAML auth
This commit is contained in:
parent
002b51a656
commit
12c32bde14
@ -30,9 +30,8 @@
|
||||
"""
|
||||
.. moduleauthor:: Adolfo Gómez, dkmaster at dkmon dot com
|
||||
"""
|
||||
from cProfile import label
|
||||
from json import tool
|
||||
import re
|
||||
from urllib.parse import urlparse
|
||||
import xml.sax
|
||||
import requests
|
||||
import logging
|
||||
@ -304,12 +303,14 @@ class SAMLAuthenticator(auths.Authenticator):
|
||||
request: 'ExtendedHttpRequest',
|
||||
params: typing.Dict[str, typing.Any] = {},
|
||||
) -> typing.Dict[str, typing.Any]:
|
||||
manageUrlObj = urlparse(self.manageUrl.value)
|
||||
script_path = manageUrlObj.path
|
||||
# If callback parameters are passed, we use them
|
||||
if params:
|
||||
return {
|
||||
'https': ['off', 'on'][params.get('https', False)],
|
||||
'http_host': params['http_host'],
|
||||
'script_name': self.manageUrl.value, # params['path_info'],
|
||||
'script_name': script_path, # params['path_info'],
|
||||
'server_port': params['server_port'],
|
||||
'get_data': params['get_data'].copy(),
|
||||
'post_data': params['post_data'].copy(),
|
||||
@ -320,7 +321,7 @@ class SAMLAuthenticator(auths.Authenticator):
|
||||
return {
|
||||
'https': 'on' if request.is_secure() else 'off',
|
||||
'http_host': request.META['HTTP_HOST'],
|
||||
'script_name': self.manageUrl.value, # request.META['PATH_INFO'],
|
||||
'script_name': script_path, # request.META['PATH_INFO'],
|
||||
'server_port': request.META['SERVER_PORT'],
|
||||
'get_data': request.GET.copy(),
|
||||
'post_data': request.POST.copy(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user