从传递ACS Azure的URL参数,以我的自定义身份提供程序? [英] Passing URL parameters from Azure ACS to my custom Identity Provider?

查看:270
本文介绍了从传递ACS Azure的URL参数,以我的自定义身份提供程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在开发一个自定义的身份提供程序(STS)来验证我们的应用程序。在这个项目中,我们使用Azure的Acesses控制服务2.0和我们的身份提供者是一个wsfederation。

We're developing a custom identity Provider(STS) to authenticate our applications. In this project we're using the Azure Acesses Control Services 2.0 and our Identity provider is a wsfederation.

所以,在项目开始时,湛蓝的ACS已被称为wctx的URL参数,该参数起到了传递什么,而ACS保持参数时取消ACS重定向到身份提供者,但是现在的参数值进行加密时,登录页面是开放的,所以我们不能读取。

So, when starting the project, the azure ACS has had a url parameter called wctx, this parameter served to pass anything, and the ACS keeping the parameter when de ACS redirect to Identity provider, however now the parameter's value is encrypted when the login page is open, so we can't read.

我想传递一个文化,是谁打来的登录页面。

I'd like to pass a culture and who is calling the login page.

任何人有任何IDEIA?

Anybody have any ideia?

推荐答案

wctx 参数不应该由你的身份提供者食用。这个参数的目的是为你的RP存储它需要的任何数据,这将与当ACS发送一个WS联合登录响应令牌一起返回到它。如果你想发送邮件到您的身份提供者,这样做最简单的办法是举办自己的HRD页,为选项2:主机自定义登录页面中的这个MSDN页面。在您的命名空间下载链接样品为起点,然后修改低于code:

The wctx parameter should not be consumed by your identity provider. The intent of this parameter is for your RP to store any data it needs, which will be returned to it along with the token when ACS sends a WS-Federation sign-in response. If you want to send a message to your identity provider, the easiest way to do so is to host your own HRD page, as in the "Option 2: Host a Custom Login Page" section of this MSDN page. Download the linked sample in your namespace as a starting point and then modify the code below:

    // Sets a cookie to remember the chosen identity provider and navigates to it.
    function IdentityProviderButtonClicked() {
        SetCookie(this.getAttribute("name"));

        // Add any extra query parameters you want before redirecting.
        window.location = this.getAttribute("id") + "&extraParameter=value";
        return false;
    }

您想传递任何额外的参数可以以这种方式加入,并将其对您的身份提供者。

Any extra parameters you want to pass can be added in this way and will make it to your identity provider.

这篇关于从传递ACS Azure的URL参数,以我的自定义身份提供程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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