Passing URL parameters from Azure ACS to my custom Identity Provider?

我与影子孤独终老i 提交于 2019-12-31 07:05:13

问题


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.

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.

Anybody have any ideia?


回答1:


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.



来源:https://stackoverflow.com/questions/15097275/passing-url-parameters-from-azure-acs-to-my-custom-identity-provider

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!