You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何在WSO2 IS 5.5.0中移除SAML SSO重定向页面

How to Remove the SAML SSO Redirect Prompt Page in WSO2 Identity Server 5.5.0

Hey there! I’ve tackled this exact problem before—let’s eliminate that intermediate redirect page showing the "You are now redirected to URL If the redirection fails, please click the post button" message. Here’s a straightforward step-by-step guide:

  • Step 1: Locate the responsible JSP file
    The page you’re seeing is generated by a JSP in the default authentication endpoint. Head to <IS_HOME>/repository/deployment/server/webapps/authenticationendpoint/WEB-INF/jsps/ and open samlsso_post.jsp—this is the file that renders the prompt and handles the SAML response submission.

  • Step 2: Rewrite the JSP for instant, invisible redirect
    By default, this JSP displays the prompt and adds a slight delay before submitting the SAML response. To skip the prompt entirely, replace the entire content of the file with this minimal auto-submit code:

    <%@ page contentType="text/html;charset=UTF-8" language="java" %>
    <html>
    <head>
        <script type="text/javascript">
            // Auto-submit the form the moment the page loads
            window.addEventListener('load', function() {
                document.forms[0].submit();
            });
        </script>
    </head>
    <body style="display: none;">
        <form method="post" action="<%= request.getParameter("ACS_URL") %>">
            <%
                String samlResponse = request.getParameter("SAMLResponse");
                String relayState = request.getParameter("RelayState");
            %>
            <input type="hidden" name="SAMLResponse" value="<%= samlResponse %>"/>
            <% if (relayState != null && !relayState.trim().isEmpty()) { %>
                <input type="hidden" name="RelayState" value="<%= relayState %>"/>
            <% } %>
        </form>
    </body>
    </html>
    

    The display: none style ensures no content is visible, and the script submits the form instantly without waiting for user input.

  • Step 3: Restart WSO2 IS
    Save your changes to the JSP file, then restart your WSO2 Identity Server instance. This ensures the modified authentication endpoint is loaded correctly.

  • Test the flow
    Run through your SAML SSO process again—you’ll now be redirected straight to your Demo page without seeing that intermediate prompt.

A quick note: If you’re using a custom authentication endpoint (instead of the default one), make sure you modify the corresponding samlsso_post.jsp in your custom web app directory instead.

内容的提问来源于stack exchange,提问作者Ompratap Singh

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.28 07:17:38