URL redirection from ADFS server

后端 未结 1 982
伪装坚强ぢ
伪装坚强ぢ 2020-12-31 10:01

I\'m using ADFS for authentication in my ASP.net web app. The STS server redirects the browser to https://test.contoso.com. STS doesn\'t allow any return URL parameter when

相关标签:
1条回答
  • 2020-12-31 10:10

    Upon authentication, ADFS by default should redirect the user to the Relying Party Application realm. It sounds like this is what you have already but you want to be able to redirect to a different RP URL.

    Let's suppose you have an RP, with the realm http://myrprealm.com configured in ADFS. The user browses to http://myrprealm.com/Contacts.aspx. The WIF FederatedAuthenticationModule (FAM) sees that the user is not authenticatd, so it saves the relative url "/Contacts.aspx" inside a Return URL parameter called ru. This ru gets packaged inside the WS-Federation Passive context parameter (wctx). The FAM then redirects the user to ADFS for authentication. ADFS will preserve the wctx parameter and echo it back to the RP (http://myrprealm.com) upon successful authentication. Now the FAM processes this ADFS response. When the FAM opens up the wctx, it notices that ru=/Contacts.aspx, so after establishing a session, it will redirect the user to Contacts.aspx.

    If you incorporate WIF into your ASP.NET site using the the SDK (visual studio > Add STS Reference), you will have this behavior by default.

    0 讨论(0)
提交回复
热议问题