Disable body and content-type header signature when content-type is m… #50
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.
…ultipart/form-data
Hello,
I've been using this library to authenticate access to some Symfony webservices. It has been working great until some of my webservices required content to be sent in multipart/form-data (file upload).
Given that the body is not empty and that there is a
Content-Type
header, these parts are added to be signed by theAuthorizationHeaderBuilder
when the request is sent.But as per the php documentation (http://php.net/manual/en/wrappers.php.php) the php://input is not available when the
Content-Type
ismultipart/form-data
, so when the signature is checked it considers the body empty and theRequestAuthenticator
class does not compute the same signature.With this PR I propose to disable the signature of the body and the Content-Type header when the request Content-Type is multipart/form-data.
NB. I've been successfully consuming my multipart/form-data webservices using the JS library which it seems does not include the body nor the Content-Type header to the signature.
Thank you for your awesome work!