ZF-11880: Authentication error when using Calendar library with 2-legged OAuth
I setup a valid HttpClient using OAuth (2-legged authentication with a consumer key and secret). This is then passed to the Zend_Gdata_Calendar constructor but when I call Zend_Gdata_Calendar#getCalendarListFeed I get the Exception:
Expected response code 200, got 401 Unknown authorization header
This is due to the required "xoauth_requestor_id" query parameter missing from the URI. There doesn't seem to be a way to set this with Zend_Gdata_Calendar.
I tried setting "xoauth_requestor_id" in the setParameterGet() method of the passed in HttpClient but Zend_Gdata_Calendar doesn't seem to use the injected instance of HttpClient to build the request and this GET parameter is ignored.
I have managed to work around this issue for now, detailed in http://stackoverflow.com/questions/7481570/…
It would be nice if setting "xoauth_requestor_id" was either build into the Zend_Gdata_Calendar class or if that class used HttpClient to build the request parameters.