Description
I would like to redirect to a page after logout from a SAML authentication with tomcat plugin.
I have added this in my fediz_config.xml
<logoutRedirectToConstraint type="String">.*logout.do.*</logoutRedirectToConstraint>
Then when I logout, instead of being redirected as expected I have an http 400 because the redirec url (/mycontext/logout.do?display=2) is url encoded and becomes not valid (because of / and ?).
I looked in the code and it seems to me the issue is here
org.apache.cxf.fediz.core.handler.LogoutHandler.signoutCleanup(HttpServletRequest request, HttpServletResponse response)
line 114
response.sendRedirect(URLEncoder.encode(wreply, "UTF-8"));
should be replaced with
response.sendRedirect(response.encodeRedirectURL(wreply);