Using REST to Login user to Windows Live

2019-06-06 04:13发布

I was reading through the windows live developers doc here. In that I saw they are having an authentication method something like this.

GET https://oauth.live.com/authorize?client_id=CLIENT_ID&scope=SCOPES&     
response_type=RESPONSE_TYPE&redirect_uri=REDIRECT_URL

I understood everything except for where do I give the username and password of the user? I am planning to create an app(first one in my life) to learn the working.

I also have never used or coded something over REST.

2条回答
劫难
2楼-- · 2019-06-06 04:37

Oauth is hard to get and hard to implement.

You should choose an off-the-shelf Oauth library they exists for most languages. (Then you do not have to worry about the details. OTOH: You should know how it works to know how to set up and fix if something goes wrong.)

http://oauth.net/code/

查看更多
Explosion°爆炸
3楼-- · 2019-06-06 04:47

When using OAuth, your application never receives the user's username or password. Rather, the user logs in to Windows Live on the Windows Live servers and authorizes your application for access to their information. After they have authorized your application, you receive an access token from Windows Live on behalf of the user. You then use that access token with the Live API to retrieve user information.

Coding something using REST protocols isn't anything too terribly complicated. It has been my experience that you're just specifying parameters to the API using GET or POST as your request method. Adding OAuth on to your requests is a matter of specifying additional parameters.

You're task is to learn two things here since you've never done REST or OAUTH before. Spend time looking at both.

查看更多
登录 后发表回答