MySpace Open Platform

A Place For Developers

Welcome Developers!

in

Welcome!

in

signed makeRequest to my own server sending wrong consumer key?

Last post 12-22-2008 2:51 PM by Patrick. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 12-22-2008 2:51 PM

    signed makeRequest to my own server sending wrong consumer key?

    I am developing an openSocial app that communicates with my own server application. In my gadget, I have the following code to make a request to my own server:

    function postToMyServer() {
        var params = {};
        params[gadgets.io.RequestParameters.AUTHORIZATION] = gadgets.io.AuthorizationType.SIGNED;
        params[gadgets.io.RequestParameters.METHOD] = gadgets.io.MethodType.POST;
        post_data = gadgets.io.encodeValues({
            'par1' : 'par1 value',
            'par2' : 'par2 value'});
        params[gadgets.io.RequestParameters.POST_DATA] = post_data;
        var url = 'http://myapp.com/myapi/gimme';
        gadgets.io.makeRequest(url, callBackFunction, params);
    }

    From what I understand, in this scenario MySpace container is acting as the consumer and my server as the service provider. Therefore the MySpace container should use it's own consumer key. However, the consumer key that is being sent in the request to my server (oauth_consumer_key) is not MySpace's, but my own app's (the one I set in the OAuth settings of my MySpace app).

    This sounds wrong to me. What do you guys think?

    Filed under: , ,
Page 1 of 1 (1 items)