Magento REST api authentication

房东的猫 提交于 2020-01-23 07:50:36

问题


Is there a way to pass login credentials from code instead of entering credentials everytime in the popup for login authorization?


回答1:


You dont require login credentials every time for authorization,you'll get an access token and access secret upon successfull authorization by OAuth,use the later for further calls to the API.Oauth protocol works this way.

I guess Magento is using OAuth 1.0/1.0a,so everytime you'll authorize a user you get,

oauth_token - the Access Token that provides access to protected resources.

oauth_token_secret - the secret that is associated with the Access Token.




回答2:


You will need to use OAUTH based authentication. Then pass the request token along with each request:

Refer: http://www.magentocommerce.com/api/rest/authentication/oauth_authentication.html



来源:https://stackoverflow.com/questions/14152764/magento-rest-api-authentication

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!