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

Add support for dynamic key detection during decryption #7

Closed
wants to merge 1 commit into from

Conversation

zarqman
Copy link
Contributor

@zarqman zarqman commented Mar 17, 2017

This change adds 2 related things:

  • Allows arbitrary headers to be added during encryption. This allows any variety of things, including (but not limited to) any of the various key-identifying headers defined in the JWE spec.

  • Allows a block to be given to dynamically determine what key to use during decryption. The block is given the headers, allowing use of whatever key-identifying header may have been set during encryption. The implementation of this is very similar to dynamic key detection in ruby-jwt, making it easy to use both.

An example has been added to the README which should explain how to use both together.

@francescobbo
Copy link
Member

Hi @zarqman,

could you please split the pull request into two smaller ones? These are really two different features, and while the first looks ok to me, the second may be open to some more discussion and review.

Good job 👍

@zarqman
Copy link
Contributor Author

zarqman commented May 25, 2017

Replaced by #9 and #10, as requested.

@zarqman zarqman closed this May 25, 2017
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