Commit 1b00f4c9 authored by manuel's avatar manuel

disabled proxy on internal REST request

parent 2988a39d
...@@ -2,13 +2,15 @@ ...@@ -2,13 +2,15 @@
from security import security_util from security import security_util
from typing import List from typing import List
import logging
def _verify(token:str, roles:List[str]=[]): def _verify(token:str, roles:List[str]=[]):
try: try:
token_info = security_util.decodeToken(token, roles=roles) token_info = security_util.decodeToken(token, roles=roles)
return token_info return token_info
except Exception as e: except Exception as e:
print("ERROR DURING TOKEN VALIDATION: "+str(e)) LOGGER = logging.getLogger(__name__)
LOGGER.error("ERROR DURING TOKEN VALIDATION: "+str(e))
return None return None
...@@ -16,4 +18,4 @@ def verifyTokenRegular(token, required_scopes): ...@@ -16,4 +18,4 @@ def verifyTokenRegular(token, required_scopes):
return _verify(token) return _verify(token)
def verifyTokenAdmin(token, required_scopes): def verifyTokenAdmin(token, required_scopes):
return _verify(token, roles=["a"]) return _verify(token, roles=["a"])
\ No newline at end of file
...@@ -57,7 +57,7 @@ def decodeToken(token: str, roles:List[str]=[]) -> Dict: ...@@ -57,7 +57,7 @@ def decodeToken(token: str, roles:List[str]=[]) -> Dict:
response = requests.post( response = requests.post(
url, url,
verify=False, verify=False,
# proxies = { "http":"http://proxy.uni-klu.ac.at:3128/", "https":"http://proxy.uni-klu.ac.at:3128/" } proxies = { "http":None, "https":None }
) )
if response.status_code != 200: if response.status_code != 200:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment