What have you found for these years?

2011-05-10

minimal (?) example for oa-oauth linkedin

updated 2011-05-10 22:37
FYI, typo fix, and xpath fix

*

oa-oauth-linkedin.ru

This took me hours digging into the source to find out what's
wrong inside oa-oauth.


1. LinkedIn#user_hash is totally broken. Even if you fixed the
typo for MultiXml, it won't work still, and it would keep
saying that the response from LinkedIn is invalid. This is
because inside oa-oauth, it is rescuing NoMethodError and
considering it means LinkedIn was not returning a proper
response, which is definitely false.

MultiXml.parse is returning a plain hash which is not responding
to #xpath, that's where NoMethodError was raised, and that was
definitely a bug instead of invalid response. I can understand MultiXml
might change their returning values, but how could NoMethodError
represents invalid response at all?

Copy the development version on github for LinkedIn#user_hash
fixed this.


2. It is not clear that if your app is not returning a 404 when
auth/:provider is getting requested. I can understand oa-oauth
might not want to hide application pages, but hard coded 404 and
silently skipping authorization is more surprising in my opinion....

This is found in the code but not in the documents, too.


Other than the above two problems, oa-oauth is working fine.
I just feel I was wasting a lot of time digging into this...
a couple hours... :(

0 retries:

Post a Comment

Note: Only a member of this blog may post a comment.



All texts are licensed under CC Attribution 3.0