使用REST来登录用户的Windows Live [英] Using REST to Login user to Windows Live

查看:169
本文介绍了使用REST来登录用户的Windows Live的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在读通过在Windows Live开发者文档这里。在我看到他们有一种身份验证方法是这样的。

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.

我也从来没有使用过或codeD东西通过REST。

I also have never used or coded something over REST.

推荐答案

在使用OAuth,您的应用程序将不会收到用户的用户名和密码。相反,在以用户登录Windows Live中的Windows Live服务器上,并授权访问他们的信息应用程序。他们已经授权您的应用程序后,从的Windows Live收到代表用户的访问令牌。然后使用该访问令牌与Live API来获取用户信息。

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.

使用REST协议编码自己是不是什么太可怕的复杂。这一直是我的经验,你使用GET或POST作为请求方法只是指定参数的API。对您的请求添加OAuth是指定额外的参数的问题。

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.

你的任务是在这里学到两件事情,因为你从来没有做过REST或OAUTH。花一些时间在看这两个。

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

这篇关于使用REST来登录用户的Windows Live的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆