使用 ACS 的 RESTful 身份验证 [英] RESTful authentication using ACS

查看:33
本文介绍了使用 ACS 的 RESTful 身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个用 ASP .NET MVC 3 编写的 Web 应用程序.我使用 ACS 来验证我的用户,我定义了 Google、Windows Live、Yahoo!和 Facebook 作为身份提供者.

I have a web application written in ASP .NET MVC 3. I'm using ACS for authenticating my users and I defined Google, Windows Live, Yahoo! and Facebook as identity providers.

现在我想为应用程序公开一个 REST API(我想为 WP7 创建一个应用程序).一些调用要求对用户进行身份验证,因此我认为我应该在请求的身份验证标头中传递一个令牌.使用 ACS 执行此操作的最佳方法是什么?ACS 是否能够为我提供这些类型的令牌,或者我是否负责编写生成这些令牌的代码?

Now I want to expose a REST API for the application (I want to create an app for WP7). Some of the calls require that the user is authenticated so I thought I should pass a token in the authentication header of the request. What is the best approach to do this with ACS? Is the ACS able to provide me these kind of tokens or am I responsible for writing the code that generates these tokens?

推荐答案

是的.ACS 通过Simple Web Tokens" (SWT) 支持这种情况.请参阅此处,或 ACS 中的任何已发布"文档.ACS v2(实验室中的当前版本)扩展了对 WS-Fed、WS-trust 等的支持(这就是您今天使用的).

Yes. ACS supports this scenario with "Simple Web Tokens" (SWT). See here, or any of the "released" documentation in ACS. ACS v2, currenlty in labs, has expanded support for WS-Fed, WS-trust, etc (this is what you are using today).

这是一个 博客文章我写了更多关于手机的信息.

Here's a blog post I wrote with more information for the phone.

这篇关于使用 ACS 的 RESTful 身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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