Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 2301, in __call__
return self.wsgi_app(environ, start_response)
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 2287, in wsgi_app
response = self.handle_exception(e)
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1733, in handle_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.9/site-packages/flask/_compat.py", line 35, in reraise
raise value
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 2284, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1807, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1710, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.9/site-packages/flask/_compat.py", line 35, in reraise
raise value
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1805, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1791, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/home/brent/repos/v7labs-sso-egs/python3-saml/demo-flask/index.py", line 64, in index
req = prepare_flask_request(request)
File "/home/brent/repos/v7labs-sso-egs/python3-saml/demo-flask/index.py", line 53, in prepare_flask_request
'http_host': request.netloc, # "localhost:8000",
AttributeError: 'Request' object has no attribute 'netloc'
For local testing I just hardcoded it; and the rest of the login flow works as expected.
Would updating to one of the below be correct:
Hi; thanks for the great library and well documented examples.
I am getting an exception on: https://github.com/onelogin/python3-saml/blob/master/demo-flask/index.py#L26 - I've edited the file a little bit locally; but its from line 26 in master.
For local testing I just hardcoded it; and the rest of the login flow works as expected. Would updating to one of the below be correct:
... abbreviated from https://stackoverflow.com/questions/15974730/how-do-i-get-the-different-parts-of-a-flask-requests-url