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

Serialize the AuthnEvent when adding to session #369

Merged
merged 3 commits into from
Jun 7, 2017
Merged

Serialize the AuthnEvent when adding to session #369

merged 3 commits into from
Jun 7, 2017

Conversation

decentral1se
Copy link
Contributor

@decentral1se decentral1se commented Jun 6, 2017

  • Any changes relevant to users are recorded in the CHANGELOG.md.
  • The documentation has been updated, if necessary.

This takes a naive approach to solving this issue:

  1. I use the __dict__ attribute to take the useful data from the AuthnEvent object
  2. Use the dict access syntax for the session['authn_event'] from there onwards
  3. Rebuild the object with AuthnEvent(**session['authn_event']) to use the valid() function
    3a. I add new kwargs to the AuthnEvent __init__

Another approach would be to use the jsonpickle package, but I was thinking this was a nice simple approach without the new dependency.

This will close off #360.

@coveralls
Copy link

coveralls commented Jun 6, 2017

Coverage Status

Coverage increased (+0.01%) to 62.94% when pulling a5cc187 on lwm:serialize-authn-event into 747c0f7 on OpenIDC:master.

@decentral1se decentral1se merged commit d42b936 into CZ-NIC:master Jun 7, 2017
@decentral1se decentral1se deleted the serialize-authn-event branch June 7, 2017 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants