Add support for parsing Signature-Agent as sfv::Dictionary + simplify library #61
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Simplify interface: concentrate into
lookup_componentmethodThis change removes the following constructs:
WebBotAuthSignedMessageSignedMessage::fetch_all_signature_headersSignedMessage::fetch_all_signature_inputsand modifies the
lookup_componentmethod to be the primary source ofinformation about a message. The goal here is to make it possible to
treat all HTTP headers, including special ones like
Signature-Agent,etc. on the same footing. It also removes a source of complexity for
implementors, since they would need to maintain an independent method
just to fetch special values.
Add support for parsing Signature-Agent as an sfv::Dictionary
This change supports handling Signature-Agent as either an
sfv::Dictionary or an sfv::Item. To decide which way to process, it
relies on whether or not the
Signature-Agentheader listed in theSignature-Inputfield has an associatedkeyparameter. If present,it attempts to parse as a dictionary.
I've added tests to ensure both types can be handled perfectly well.