Auth 1.0 oauth_signature creation Android for magento API

前端 未结 2 666
遥遥无期
遥遥无期 2020-12-02 00:55

I call the Magento API with the following Autherization as header,

auth = \"OAuth oauth_consumer_key=**********************,oauth_consumer_secret=***********         


        
2条回答
  •  旧巷少年郎
    2020-12-02 01:35

    For Oauth i dont think you should be passing CS and TS . You need to concatenate a set of URL-encoded attributes and parameters to construct the signature base string. please refer - devdocs.magento.com/guides/v2.0/get-started/authentication/

    so in other words, one of the params in SHA1 will be an encoded url and it should be in a specific format starting with HTTP method.

    the url should contains the above params before encoding.

    i did a similar Oauth authentication in Woocommerce API for android please refer this gist url for more info.

    https://gist.github.com/Muneefm/f4c08b2aa3accd57fa890156f74e619a

    in this check the method called getLoginUrl() . in which i have concatenate the url.

提交回复
热议问题