From 9c382611b69cf48e4063395b6bd84c8733b9dc67 Mon Sep 17 00:00:00 2001 From: Johan Lundberg Date: Tue, 28 Apr 2015 16:18:24 +0200 Subject: Docker image now installing and running. --- edit-webapp/x509-prompt.jsp | 111 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 edit-webapp/x509-prompt.jsp (limited to 'edit-webapp/x509-prompt.jsp') diff --git a/edit-webapp/x509-prompt.jsp b/edit-webapp/x509-prompt.jsp new file mode 100644 index 0000000..51b0e02 --- /dev/null +++ b/edit-webapp/x509-prompt.jsp @@ -0,0 +1,111 @@ +<%@ taglib uri="urn:mace:shibboleth:2.0:idp:ui" prefix="idpui" %> +<%@ page import="javax.servlet.http.Cookie" %> +<%@ page import="org.opensaml.profile.context.ProfileRequestContext" %> +<%@ page import="net.shibboleth.idp.authn.ExternalAuthentication" %> +<%@ page import="net.shibboleth.idp.authn.context.AuthenticationContext" %> +<%@ page import="net.shibboleth.idp.profile.context.RelyingPartyContext" %> +<%@ page import="net.shibboleth.idp.ui.context.RelyingPartyUIContext" %> + +<% +final Cookie[] cookies = request.getCookies(); +if (cookies != null) { + for (final Cookie cookie : cookies) { + if (cookie.getName().equals("x509passthrough")) { + response.sendRedirect(request.getContextPath() + "/Authn/X509?" + + ExternalAuthentication.CONVERSATION_KEY + "=" + + request.getParameter(ExternalAuthentication.CONVERSATION_KEY)); + return; + } + } +} + +final String key = ExternalAuthentication.startExternalAuthentication(request); +final ProfileRequestContext prc = ExternalAuthentication.getProfileRequestContext(key, request); +final AuthenticationContext authnContext = prc.getSubcontext(AuthenticationContext.class); +final RelyingPartyContext rpContext = prc.getSubcontext(RelyingPartyContext.class); +final RelyingPartyUIContext rpUIContext = authnContext.getSubcontext(RelyingPartyUIContext.class); +final boolean identifiedRP = rpUIContext != null && !rpContext.getRelyingPartyId().contains(rpUIContext.getServiceName()); +%> + + + + + Example Login Page + + + + +
+
+
+ +
+ +
+
+
+ + + + <% if (identifiedRP) { %> + + Log in to + + <% } %> + +
+ Please make sure that your user certificate is properly configured in your web browser + and click on the Certificate Login button. +
+ +
+ + Do not show this page in the future. + + +
+
+ + <% + // + // SP Description & Logo (optional) + // These idpui lines will display added information (if available + // in the metadata) about the Service Provider (SP) that requested + // authentication. These idpui lines are "active" in this example + // (not commented out) - this extra SP info will be displayed. + // Remove or comment out these lines to stop the display of the + // added SP information. + // + // Documentation: + // https://wiki.shibboleth.net/confluence/display/SHIB2/IdPAuthUserPassLoginPage + // + // Example: + %> + <% if (identifiedRP) { %> +

+ default + SP description +

+ <% } %> + +
+ +
+
+ + +
+ + + -- cgit v1.1