Skip to content

Commit baf156a

Browse files
committed
Fixes #18
OAuthListener: Parameters may be included from the body if the content-type is urlencoded. TODO: This should be covered in tests.
1 parent b80fad2 commit baf156a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/Bitbucket/API/Http/Listener/OAuthListener.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,13 @@ public function postSend(RequestInterface $request, MessageInterface $response)
126126
*/
127127
protected function getParametersToSign(RequestInterface $request)
128128
{
129-
return array_merge($this->getOAuthParameters($request), $this->getContentAsParameters($request));
129+
$params = $this->getOAuthParameters($request);
130+
131+
if ($request->getHeader('Content-Type') === 'application/x-www-form-urlencoded') {
132+
$params = array_merge($params, $this->getContentAsParameters($request));
133+
}
134+
135+
return $params;
130136
}
131137

132138
/**

0 commit comments

Comments
 (0)