This repository was archived by the owner on Jun 23, 2023. It is now read-only.

Description
@develop branch
If a first session have been done, the next one fails at verify_user view.
the failure is cause by the fact that the flushed session database doesn't have a 'db' element in it
the patchy workaroud is this, in verify_user view:
session_manager = ec.endpoint_context.session_manager
dump = session_manager.dump()
if not dump.get('db'):
dump['db'] = {}
session_manager.load(dump)
GHere the traceback of the error
Traceback (most recent call last):
File "/path/to/DEV/IdentityPython/OIDC/env/lib/python3.8/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/path/to/DEV/IdentityPython/OIDC/env/lib/python3.8/site-packages/django/core/handlers/base.py", line 179, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/path/to/DEV/IdentityPython/OIDC/env/lib/python3.8/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
return view_func(*args, **kwargs)
File "/path/to/DEV/IdentityPython/OIDC/django-oidc-op/example/oidc_provider/views.py", line 303, in verify_user
_session_id = session_manager.create_session(
File "/path/to/DEV/IdentityPython/OIDC/env/lib/python3.8/site-packages/oidcop/session/manager.py", line 189, in create_session
_usi = self.get([user_id])
File "/path/to/DEV/IdentityPython/OIDC/env/lib/python3.8/site-packages/oidcop/session/database.py", line 99, in get
raise InconsistentDatabase('Missing session db')
oidcop.session.database.InconsistentDatabase: Missing session db
here the commented workaround in the example project
peppelinux/django-oidc-op@e97963c