I need a library based on php(preferably) like loginWithBitbucket.php so that, I send authorization request to it and it will authorize the bitbucket user by opening new tab and asking for user login credentials and do the authorization and then return the response data i.e. JSON data as the response of the ajax request.
Asked
Active
Viewed 105 times
-4
-
@Downvoter: Its nice to drop a comment when you downvote... – amulya349 Jun 01 '15 at 12:21
-
In response to your flag - based on your answer to your question I don't think any of the downvoters are misunderstanding your question. You're asking for library recommendations, right? You just posted one yourself in your answer. That sort of question is off-topic, and it is the most likely explanation for the downvotes. – BoltClock Jun 12 '15 at 16:07
-
@BoltClock: Can you please delete this post? – amulya349 Jun 18 '15 at 11:40
2 Answers
1
Have a library for node.js and one for PHP. Both were just a quick Google search away. You should definitely use Google if you search for a library the next time.

Cu3PO42
- 1,403
- 1
- 11
- 19
-
I have googled all that stuff. The problem is, they won't work if you call ajax request to them. I mean I want to authenticate with ajax only. So that, after the authentication, i should get the user data as json response to the ajax. For example, If I send a req to the libraries, they are returning HTML login form(i want JSON data of user only) of bitbucket if the user is not logged in instead of popping up a new window opening the form and after auth, return the JSON . – amulya349 Jun 01 '15 at 12:25
-
@cryptomaniac60 these libraries usually provide their own functions to make calls to API endpoints after you authenticated using them. [Here](https://github.com/ciaranj/node-oauth/wiki/Full-working-example-for-interacting-with-google) is a full example for the node.js library. As you can see the `oa` object has a `get` method to retrieve data from the API. – Cu3PO42 Jun 01 '15 at 12:30