wso2 是自定义身份验证端点,未使用重定向页面 [英] wso2is custom authenticationendpoint, redirect page not used

查看:77
本文介绍了wso2 是自定义身份验证端点,未使用重定向页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 wso2is 开发 saml sso.我根据下面的博客文章自定义了身份验证端点 1.基本上我只是在我的服务器上部署了一场战争并配置了 application-authenticators.xml 来使用它:

I am developing saml sso using wso2is. I customized the authentication endpoint according the blog post below 1. Basically I just deployed a war on my server and configured application-authenticators.xml to use it:

<Authenticators>
<Authenticator name="BasicAuthenticator" disabled="false" factor="1">
    <!-- <Status value="10" loginPage="/authenticationendpoint/login.do" /> -->
    <Status value="10" loginPage="https://servlet.example.com/customlogin/login.do" /> 
</Authenticator>
</Authenticators>

登录工作正常,我的自定义登录页面将表单发送到https://servlet.example.com/idp/commonauth",它将我重定向到我的 sp.但我也想在登录后自定义重定向页面.在自定义端点中有一个名为samlsso_redirect.jsp"的文件,它看起来应该可以完成工作,但其内容被忽略.

login is working fine, my custom login-page sends a form to "https://servlet.example.com/idp/commonauth" which redirects me to my sp. but I also want to customize the redirect-page after the login. in the custom endpoint there is a file named 'samlsso_redirect.jsp' which looks like it should do the work but its contents are ignored.

奇怪的是samlsso_redirect.jsp"捆绑的身份验证端点也被忽略了.

strangely 'samlsso_redirect.jsp' the the bundled authentication endpoint is also ignored.

我还下载了 wso2is 的源代码,发现 org.wso2.carbon.identity.sso.saml.servlet.SAMLSSOProviderServlet 在 sendResponse() 方法中对重定向消息进行了硬编码.

I have also downloaded the sources of wso2is and found org.wso2.carbon.identity.sso.saml.servlet.SAMLSSOProviderServlet hard codes the redirect message in the sendResponse() method.

有人知道它是如何工作的以及我在这里缺少什么吗?如何自定义重定向消息?

Does somebody know how it is working and what I am missing here? How can I customize the redirect message?

http://dulanja.blogspot.sk/2014/01/wso2-is-samlsso-customizing-login-page.html

推荐答案

如果您使用的是 WSO2IS 5.0.0 版本或更高版本,您可以简化编辑 html 文件,该文件位于 IS_HOME\repository\resources\security\sso_redirect.html

If you are using WSO2IS 5.0.0 version or higher version, You can simplify edit html file which can be found at IS_HOME\repository\resources\security\sso_redirect.html

以下适用于 WSO2IS 4.6.0 及更早版本

Following applies to WSO2IS 4.6.0 and older versions

似乎无法通过使用某些扩展来自定义重定向页面.请参阅此 jira

It seems to be that redirect page is can not be customized by using some extension. Please see this jira

但是,如果您想在 4.6.0 中对其进行自定义,则可以执行以下操作...

However You can do as following if you want to customize it in 4.6.0...

  1. svn checkout https://svn.wso2.org/repos/wso2/carbon/platform/branches/turing/components/identity/org.wso2.carbon.identity.sso.saml/4.2.2

在 src/main/java/org/wso2/carbon/identity/sso/saml/servlet/SAMLSSOProviderServlet.java 中,您必须修改在 sendResponse() 方法中打印的 HTML.

In src/main/java/org/wso2/carbon/identity/sso/saml/servlet/SAMLSSOProviderServlet.java you have to modify the HTML getting printed in sendResponse() method.

使用 maven 构建组件并将其作为补丁放置在 wso2is-4.6.0/repository/components/patches 中.将jar文件复制到任意补丁目录

Build the component using maven and place as a patch in wso2is-4.6.0/repository/components/patches. Copy jar file into any patch directory

重启服务器

注意:构建的 jar 名称显示为:org.wso2.carbon.identity.sso.saml-4.2.2.jar.在放入补丁文件夹之前,请确保将其重命名为 org.wso2.carbon.identity.sso.saml_4.2.2.jar(注意破折号被下划线替换).

note : The built jar name appears as: org.wso2.carbon.identity.sso.saml-4.2.2.jar. Make sure to rename it to org.wso2.carbon.identity.sso.saml_4.2.2.jar (notice that the dash is replaced by an underscore) before placing in the patch folder.

这篇关于wso2 是自定义身份验证端点,未使用重定向页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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