oAuth + ADFS 联盟;这可能吗?如何在 ASP.NET MVC 中实现这一点?
我想在我的 MVC 站点中支持多种身份验证机制,例如 oAuth 和 ADFS。这可能吗?我将如何使用其中之一?
我的理解是 ADFS/WIF 将连接到整个站点,从而防止 oAuth 等替代方案
I'd like to support multiple authentication mechanisms such as oAuth and ADFS in my MVC site. Is this possible, and how would I go about using one or the other?
My understanding is that ADFS/WIF will hook into the entire site preventing alternates such as oAuth
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
FedUtil 只允许应用程序指向 ADFS 的一个实例。如果您再次使用它指向另一个实例,它只会覆盖旧的 ADFS 信息。在 web.config 中。
诀窍是将 ADFS 与另一个支持 OAuth 协议的 STS 联合。
StarterSTS 是支持 OpenId 的 STS 示例。这是由 Dominick Baier 开发的。他刚刚通过博客宣布他正在开发 MVC 版本。
Matias Woloski 在此处发表了有关协议桥的博客< /a>.它不仅支持OpenID,还支持OAuth。
FedUtil only allows an application to point to one instance of ADFS. If you use it again to point to another instance, it simply overwrites the old ADFS info. in the web.config.
The trick is to federate ADFS with another STS which does support the OAuth protocol.
StarterSTS is an example of an STS which supports OpenId. This was developed by Dominick Baier. He has just announced via his blog that he is developing a MVC version.
Matias Woloski has blogged about a protocol bridge here. It supports not only OpenID but also OAuth.
@nzpcmad 添加 STS 来进行协议转换的建议是正确的。另一种选择是使用 ACS(AppFabric 访问控制服务)。
您也可以在 web.config 上手动添加信任关系(或在单独的项目上运行 Fedutil 并合并更改)。在这种情况下,信任将信任于知道如何处理 OAuth 和 SAML/WS-Federation 的 STS(如 @nzpcmad 提到的 STS)。开箱即用,WIF 仅理解 SAML 令牌和 WS-Federation/WS-Trust。
@nzpcmad suggestion of adding an STS to do protocol translation is correct. Another alternative is to use ACS (AppFabric Access Control Service).
You can alternatively add the trusts relationship on the web.config manually (or run Fedutil on a separate project and merge the changes). In this case the trust would be to an STS that knows how to deal with OAuth and SAML/WS-Federation (like the STSs mentioned by @nzpcmad). Out of the box, WIF only understands SAML tokens and WS-Federation/WS-Trust.
StarterSTS 不支持 OAuth,但同一个人的后续项目支持 OAuth。查看 http://identityserver.codeplex.com/ 了解更多详细信息。
除了支持 OAuth 之外,它还是使用 ASP.NET MVC 框架和 WCF 作为基础的新代码。
这仅处于 CTP 1 状态,尚未被视为完整版本,因此请仔细检查。
StarterSTS does not support OAuth but the follow-on project by the same guy does. Check out http://identityserver.codeplex.com/ for more details.
In addition to supporting OAuth it is new code using the ASP.NET MVC framework and WCF for its underpinnings.
This is only at CTP 1 status and is not yet considered a full release yet so review carefully.