-
Notifications
You must be signed in to change notification settings - Fork 73
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
Multiple Authorization error #25
Comments
This issue is blocking alot of calls which made us use an older revision for now. |
So is that Authorization bearer header not required? It was a pull request from #24 The project that this class was used on is dead, so I don't have a codebase to test this on. Would anyone like to take it over? |
With the Authorization bearer header there are more Authorization headers. RuntimeException: Request Error: Mutiple authentication schemes detected. Raw Response: Array ( [errorCode] => 0 [message] => Mutiple authentication schemes detected [requestId] => 0DIXRCG17P [status] => 401 [timestamp] => 1458637918306 ). In the documentation i can find this. ( https://developer.linkedin.com/docs/rest-api ) If it is more convienent for your application to work with data in JSON format, you can request that APIs return you JSON data using one of the following methods: For example: So maybe there is a difference for xml and json requests to linkedin regarding to the headers. |
If you remove the header Authorization: Bearer from the fetch method then the request return the data. |
I second @digitalhydra Commenting out that line lets it work. |
According to the LinkedIn documentation https://developer.linkedin.com/docs/oauth2 Step 4 says the Authorization header is the proper way to authenticate your requests. The Multi authentication scheme error can be avoided by removing the oauth2_access_token query parameter. Once that is removed the the requests will work. I have created a Pull Request for this fix. #29 |
The error returned was 401 "Mutiple authentication schemes detected" and it was caused because in the API request we were adding the parameter &oauth2_access_token= as suggested by Caserta (2015). http://pierrecaserta.com/go-oauth-facebook-github-twitter-google-plus/ Once that parameter was removed, the API returned the user data. See: ashwinks/PHP-LinkedIn-SDK#25
A recent pull request has added the following line to the ->fetch() method
$headers[] = 'Authorization: Bearer ' . $this->getAccessToken();
This is now causing the LinkedIn API to error with the message "Mutiple authentication schemes detected" [sic] as the token is included both in a header and on the query string.
The text was updated successfully, but these errors were encountered: