Azure的ACS没有产生code和HttpHandlers的? [英] Azure ACS without the generated code and HttpHandlers?

查看:123
本文介绍了Azure的ACS没有产生code和HttpHandlers的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Azure中的ACS服务是pretty甜的,我爱所有的魔力可以做,但我想为我的网络应用程序(MVC)少一点魔法。如果你看一下在codePLEX的code样品,它很容易调用服务,并从这样的一个端点获得登录提供商的JSON列表:

Azure's ACS service is pretty sweet, and I love all of the magic it can do, but I want a little less magic for my Web app (MVC). If you look at the code samples on CodePlex, it's easy enough to call the service and get a JSON list of login providers from an endpoint like this:

https://.accesscontrol.windows.net/v2/metadata/IdentityProviders.js?protocol=wsfederation&realm=http%3a%2f%2flocalhost%3a7070%2f&version=1.0&callback=?

https://.accesscontrol.windows.net/v2/metadata/IdentityProviders.js?protocol=wsfederation&realm=http%3a%2f%2flocalhost%3a7070%2f&version=1.0&callback=?

从产生的JSON,可以使一些链接到供应商,一旦你处理这些登录,他们会反弹回你通过ACS和ACS会做了一条信息所产生的令牌设置任何端点,在Azure的门户网站。

From the resulting JSON, you can render some links to the providers, and once you deal with those logins, they'll bounce you back through ACS, and ACS will do a post with the resulting token to whatever endpoint you set up in the Azure portal.

我的问题是,我该怎么办与该令牌?我不想使用WIF神奇,创建集一个IPrincipal,什么不是。我只是不希望有什么,我已经在应用程序的混乱。

My question is, what do I do with that token? I don't want to use the WIF "magic" that creates sets an IPrincipal and what not. I just don't want to mess with what I already have in the app.

推荐答案

我写了一篇博客文章,描述谁想要WIF的权力,但不希望他们的整个应用程序转换是基于索赔人的解决方案。这应该给你,你可以如何处理这种情况的想法: http://goo.gl/J8WZe

I wrote a blog post describing a solution for people who want the power of WIF but don't want to convert their entire application to being claim based. This should give you an idea of how you can approach the situation: http://goo.gl/J8WZe

最后,我延长了WIF模块类并增加了一些替代来取代魔术方法我并不需要。

Ultimately, I extended the WIF module classes and added some overrides to replace the magic methods I didn't need.

我没有测试过这一点,但你可以做的另一件事是由它暴露的各种事件登记进军WIF工作流程。

I have not tested this but the other thing you can do is tap into the WIF workflow by registering for the various events it exposes.

这篇关于Azure的ACS没有产生code和HttpHandlers的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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