Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try to login across simple oidc_exampla and get error on login #212

Open
demchenkoa opened this issue Jul 8, 2016 · 1 comment
Open
Labels
Milestone

Comments

@demchenkoa
Copy link

demchenkoa commented Jul 8, 2016

When enter name and pass "diana" "krall", redirect me to https://localhost:8092/verify and print traceback
WSGI response header value u'https://localhost:8092/authorization?acr_values=PASSWORD&redirect_uri=http%3A%2F%2Flocalhost%3A8666%2F919D3F697FDAAF138124B83E09ECB0B7&response_type=code&client_id=ybnRmeIpZjrm&upm_answer=true&scope=openid+profile+email+address+phone' is not of type str.
['Traceback (most recent call last):\n', ' File "/home/ademchenko/pyoidc-master/oidc_example/op2/server.py", line 361, in application\n return callback(environ, start_response, logger)\n', ' File "/home/ademchenko/.virtualenvs/pyoidc/local/lib/python2.7/site-packages/oic-0.8.5.1-py2.7.egg/oic/utils/authn/authn_context.py", line 217, in auth_verify\n return response(environ, start_response)\n', ' File "/home/ademchenko/.virtualenvs/pyoidc/local/lib/python2.7/site-packages/oic-0.8.5.1-py2.7.egg/oic/utils/http_util.py", line 123, in call\n start_response(self.status, self.headers)\n', ' File "/home/ademchenko/.virtualenvs/pyoidc/local/lib/python2.7/site-packages/cherrypy/wsgiserver/wsgiserver2.py", line 2297, in start_response\n "WSGI response header value %r is not of type str." % v)\n', "TypeError: WSGI response header value u'https://localhost:8092/authorization?acr_values=PASSWORD&redirect_uri=http%3A%2F%2Flocalhost%3A8666%2F919D3F697FDAAF138124B83E09ECB0B7&response_type=code&client_id=ybnRmeIpZjrm&upm_answer=true&scope=openid+profile+email+address+phone' is not of type str.\n"]
AssertionError('WSGI start_response called a second time with no exc_info.',)
Traceback (most recent call last):
File "/home/ademchenko/.virtualenvs/pyoidc/local/lib/python2.7/site-packages/cherrypy/wsgiserver/wsgiserver2.py", line 1360, in communicate
req.respond()
File "/home/ademchenko/.virtualenvs/pyoidc/local/lib/python2.7/site-packages/cherrypy/wsgiserver/wsgiserver2.py", line 875, in respond
self.server.gateway(self).respond()
File "/home/ademchenko/.virtualenvs/pyoidc/local/lib/python2.7/site-packages/cherrypy/wsgiserver/wsgiserver2.py", line 2255, in respond
response = self.req.server.wsgi_app(self.env, self.start_response)
File "/home/ademchenko/pyoidc-master/oidc_example/op2/server.py", line 368, in application
return resp(environ, start_response)
File "/home/ademchenko/.virtualenvs/pyoidc/local/lib/python2.7/site-packages/oic-0.8.5.1-py2.7.egg/oic/utils/http_util.py", line 49, in call
start_response(self.status, self.headers)
File "/home/ademchenko/.virtualenvs/pyoidc/local/lib/python2.7/site-packages/cherrypy/wsgiserver/wsgiserver2.py", line 2277, in start_response
raise AssertionError("WSGI start_response called a second "
AssertionError: WSGI start_response called a second time with no exc_info.

dont anderstand what i`am doing wrom. Thanks for halp.

@alpritt
Copy link

alpritt commented Jul 28, 2016

I doubt these are correct fixes as I don't really understand the codebase, but I was able to get this working by casting a couple of unicode values to str.

The first is in SeeOther.__call__ in the file oic/utils/http_util.py. I changed location = self.message to location = str(self.message)

Run the example again and my RP server received an error response. I fixed that by changing the line

_id = as_unicode(_id) to _id = str(as_unicode(_id)) in get_client_id in oic/utils/authn/client.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants