proxyidpfinder.jsp revision 5fac30369015c5145d91de0ada477350ede05fd4
5035N/A<%@ page import="com.sun.identity.shared.encode.Base64" %>
3853N/A<%@ page import="com.sun.identity.saml2.common.SAML2Constants" %>
3853N/A<%@ page import="com.sun.identity.saml2.common.SAML2Utils" %>
3853N/A<%@ page import="org.owasp.esapi.ESAPI"%>
3853N/A<%@ page import="org.apache.commons.lang.StringUtils"%>
3853N/A<%@ page import="java.util.List" %>
3853N/A String errorURL = "idpfinderError.html";
3853N/A HttpSession hts = request.getSession();
3853N/A idpListSt = (String) hts.getAttribute("_IDPLIST_");
3853N/A if (idpListSt != null && !idpListSt.isEmpty()) {
3853N/A lista = idpListSt.split(" ");
3853N/A relayState = (String) hts.getAttribute("_RELAYSTATE_");
3853N/A if (relayState == null || relayState.isEmpty() ||
3853N/A requestedAuthnContext = (List<String>) hts.getAttribute("_REQAUTHNCONTEXT_");
3853N/A if (requestedAuthnContext != null && requestedAuthnContext.isEmpty()) {
3853N/A String spRequester = (String) hts.getAttribute("_SPREQUESTER_");
3853N/A if (spRequester == null) response.sendRedirect(errorURL);
3853N/A samlIdP = request.getParameter("_saml_idp");
3853N/A if (!ESAPI.validator().isValidInput("HTTP Parameter Value: " + samlIdP, samlIdP,
3853N/A if (samlIdP != null && !samlIdP.isEmpty()) {
3853N/A hts.removeAttribute("_IDPLIST_");
hts.removeAttribute("_RELAYSTATE_");
hts.removeAttribute("_SPREQUESTER_");
hts.removeAttribute("_REQAUTHNCONTEXT_");
if (relayState.indexOf("?") == -1) {
response.sendRedirect(relayState + "_saml_idp=" + samlIdP);
<p>You are here because you initiated a request in the Service Provider <b><%= spRequester %></b> and
<br>You asked for the <%= requestedAuthnContext == null ? "<b>default</b> " : "" %>Assurance level <b><%= requestedAuthnContext != null ? StringUtils.join(requestedAuthnContext, " ") : "" %></b>:
if (lista != null && lista.length > 0) {