如何自定义所有WSO2 Identity Server登录相关页面

时间:2015-04-08 11:38:44

标签: wso2is

我已按照本指南自定义登录页面:https://docs.wso2.com/display/IS500/Customizing+Login+Pages

这一切都很好。

我已经检查了4.3.3版本中的代码并对本地更改: https://github.com/wso2/carbon-identity/tree/release-4.3.3/components/identity/org.wso2.carbon.identity.application.authentication.endpoint

在处理OpenIDConnect / OAuth2时,除了涉及的login.jsp之外,还有更多页面,例如页面oauth2_authz.jsp。使用我修改过的authenticationendpoint.war替换默认的authenticationendpoint.war时,这也不是问题。

当尝试在不同的URL下单独托管自定义authenticationendpoint.war时出现问题。

WSO2 Identity Server配置了AuthenticationEndpoint的绝对URL:

<AuthenticationEndpointURL>http://localhost:9990/login.do</AuthenticationEndpointURL>

我的login.jsp形式被更改为提交回WSO2 Identity Server的绝对URL,而不是相对URL ../ commonauth。

<form action="https://localhost:9443/commonauth"...

我看到的问题是我被正确地重定向到我的自定义登录页面,但是authz页面(Approve | Approve Always | Deny的声明和按钮列表)仍然是WSO2中托管的默认页面。

我希望WSO2 Identity Server能够使用我所有的自定义页面,而不仅仅是login.jsp。

这些通常是

  • oauth2_authz.jsp
  • oauth2_consent.jsp
  • oauth2_error.jsp

有人可以建议如何完成此操作或指向一些有关此文档的文档吗?

1 个答案:

答案 0 :(得分:0)

在WSO2IS 5.1.0中使用IDENTITY-2977解决了这个问题。通过相关更改,您可以使用samlsso_login oauth2_authz文件中提供的配置自定义oauth2_erroroauth2_consentweb.xmlauthenticationendpoint.war网址。有关详细信息,请参阅relevant section of the web.xml