redouane59 / twittered

Twitter API client for Java developers
Apache License 2.0
236 stars 64 forks source link

fix: do not sign the request for POST oauth/access_token #328

Closed Juneezee closed 2 years ago

Juneezee commented 2 years ago

Fix Issue #310.

The POST /oauth/access_token endpoint does not require the Authorization header to be set [1]. If signRequired is true in makeRequest(), then OAuth 1.0 parameters will be added to the Authorization header [2,3]. Twitter will then return 401 - Request Token missing as a response for the POST request.

This might be a bug of Twitter API as Twitter should ignore the Authorization header in this endpoint when it is not required.

[1]: https://developer.twitter.com/en/docs/authentication/api-reference/access_token

redouane59 commented 2 years ago

Hey @Juneezee , thanks for the PR !

sonarcloud[bot] commented 2 years ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication