Closed ajsmilutin closed 7 years ago
I have the same problem, but I think this pull request fixes it. If I add those lines to my cache.py file, it seems that I have the key in the object.
Now it fails with TypeError: <saml2.saml.NameID object at 0x7fcfcf494e90> is not JSON serializable
but that's another story ;)
@MiguelSR Thanks for testing it. In addition, could you please test if it works for you with PR #9 changes and the latest pysaml2 (not yet released - please install directly from the repo. Thank you for your help.
Hi everybody, thanks for the testing. Last night I have managed to find and fix the bug. I am not sure if everyghing is ok but works for me, since I have only one IdP. It si similar like one from the pull that MiguelSR pointed out. Here is how my solution looks like:
def sync(self):
self._set_objects(self)
self.session.modified = True
Th change is in the class DjangoSessionCacheAdapter
I will probably change it to the code from the MiguelSR push.
Thanks @ajsmilutin, your fix is the least verbose solution, I still don't know why it is needed though. Anyway, it seems innocent otherwise and if there's really nobody who could explain it, I guess we have to take the pragmatic approach and "just include it". Would you please create a PR?
No problem @knaperek . I guess that PR means Pull request. I'll make it later today.
Even with the given fixes - I still run into the problem - I am using django 1.9 and memcache with pylibmc
Please note that the self._set_objects(self)
line seems to cause https://github.com/knaperek/djangosaml2/issues/40
@sheepsy90 what kind of problems do you experience? Would you mind sharing the details, thanks!
Closing this for no activity. @sheepsy90 please reopen if you're still experiencing the issues in the latest djangosaml2 version.
I am using djangosaml2 as SP, where IdP is auth0.com. I don't have any problems logging in, The redirect works and the assertion is posted. When I try to logout i get the following error:
KeyError at /saml2/logout/ '2=urn%3Aoasis%3Anames%3Atc%3ASAML%3A1.1%3Anameid-format%3Aunspecified,4=auth0%7C56e5560a9e61a71f4694c1d8'
I have look into the code, and after assertion the object
client
has the field 'users' with the field under the clinent.users.cache._db with the key given above. But when I try to logout the client.users.cache_db is empty.Here is the Traceback
and the SAML settings