[java-idp-testbed COMMIT] in /trunk/src/main: java/sp/SAML2Controller.java webapp/index.html
noreply at shibboleth.net
noreply at shibboleth.net
Fri Jan 16 13:03:09 EST 2015
Author: tzeller
Date: Fri Jan 16 13:03:05 2015
New Revision: 294
URL: http://svn.shibboleth.net/view/java-idp-testbed?rev=294&view=rev
Log:
Add POST binding and isPassive and ForceAuthn tests.
Ping IdP status page rather than polling log files when waiting for Jetty server startup.
Modified:
trunk/src/main/java/sp/SAML2Controller.java
trunk/src/main/webapp/index.html
Modified: trunk/src/main/java/sp/SAML2Controller.java
URL: http://svn.shibboleth.net/view/java-idp-testbed/trunk/src/main/java/sp/SAML2Controller.java?rev=294&r1=293&r2=294&view=diff
==============================================================================
--- trunk/src/main/java/sp/SAML2Controller.java (original)
+++ trunk/src/main/java/sp/SAML2Controller.java Fri Jan 16 13:03:05 2015
@@ -4,7 +4,6 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import javax.xml.namespace.QName;
import net.shibboleth.utilities.java.support.component.ComponentInitializationException;
import net.shibboleth.utilities.java.support.net.URLBuilder;
@@ -21,8 +20,8 @@
import org.opensaml.saml.ext.saml2aslo.Asynchronous;
import org.opensaml.saml.saml2.binding.encoding.impl.HTTPPostEncoder;
import org.opensaml.saml.saml2.binding.encoding.impl.HTTPRedirectDeflateEncoder;
+import org.opensaml.saml.saml2.core.AuthnRequest;
import org.opensaml.saml.saml2.core.Extensions;
-import org.opensaml.saml.saml2.core.AuthnRequest;
import org.opensaml.saml.saml2.core.Issuer;
import org.opensaml.saml.saml2.core.LogoutRequest;
import org.opensaml.saml.saml2.core.LogoutResponse;
@@ -63,7 +62,7 @@
}
@RequestMapping(value="/InitSSO/POST", method=RequestMethod.GET)
- public void initSsoRequestPost(HttpServletRequest servletRequest, HttpServletResponse servletResponse) throws Exception {
+ public void initSSORequestPost(HttpServletRequest servletRequest, HttpServletResponse servletResponse) throws Exception {
AuthnRequest authnRequest = buildAuthnRequest(servletRequest);
authnRequest.setDestination(getDestinationPost(servletRequest, "SSO"));
MessageContext<SAMLObject> messageContext = buildOutboundMessageContext(authnRequest,
@@ -71,7 +70,7 @@
SAMLMessageSecuritySupport.signMessage(messageContext);
encodeOutboundMessageContextPost(messageContext, servletResponse);
}
-
+
@RequestMapping(value="/InitSSO/Passive", method=RequestMethod.GET)
public void initSSORequestPassive(HttpServletRequest servletRequest, HttpServletResponse servletResponse) throws Exception {
AuthnRequest authnRequest = buildAuthnRequest(servletRequest);
@@ -90,6 +89,31 @@
MessageContext<SAMLObject> messageContext = buildOutboundMessageContext(authnRequest,
buildIdpSsoEndpoint(SAMLConstants.SAML2_REDIRECT_BINDING_URI, authnRequest.getDestination()));
encodeOutboundMessageContextRedirect(messageContext, servletResponse);
+ }
+
+ @RequestMapping(value = "/InitSSO/POST/Passive", method = RequestMethod.GET) public void initSSORequestPostPassive(
+ HttpServletRequest servletRequest, HttpServletResponse servletResponse) throws Exception {
+ AuthnRequest authnRequest = buildAuthnRequest(servletRequest);
+ authnRequest.setDestination(getDestinationPost(servletRequest, "SSO"));
+ authnRequest.setIsPassive(true);
+ MessageContext<SAMLObject> messageContext =
+ buildOutboundMessageContext(authnRequest,
+ buildIdpSsoEndpoint(SAMLConstants.SAML2_POST_BINDING_URI, authnRequest.getDestination()));
+ SAMLMessageSecuritySupport.signMessage(messageContext);
+ encodeOutboundMessageContextPost(messageContext, servletResponse);
+ }
+
+ @RequestMapping(value = "/InitSSO/POST/ForceAuthn", method = RequestMethod.GET) public void
+ initSSORequestPostForceAuthn(HttpServletRequest servletRequest, HttpServletResponse servletResponse)
+ throws Exception {
+ AuthnRequest authnRequest = buildAuthnRequest(servletRequest);
+ authnRequest.setDestination(getDestinationPost(servletRequest, "SSO"));
+ authnRequest.setForceAuthn(true);
+ MessageContext<SAMLObject> messageContext =
+ buildOutboundMessageContext(authnRequest,
+ buildIdpSsoEndpoint(SAMLConstants.SAML2_POST_BINDING_URI, authnRequest.getDestination()));
+ SAMLMessageSecuritySupport.signMessage(messageContext);
+ encodeOutboundMessageContextPost(messageContext, servletResponse);
}
@RequestMapping(value="/InitSLO/Redirect", method=RequestMethod.GET)
Modified: trunk/src/main/webapp/index.html
URL: http://svn.shibboleth.net/view/java-idp-testbed/trunk/src/main/webapp/index.html?rev=294&r1=293&r2=294&view=diff
==============================================================================
--- trunk/src/main/webapp/index.html (original)
+++ trunk/src/main/webapp/index.html Fri Jan 16 13:03:05 2015
@@ -10,9 +10,11 @@
<ul>
<li><a href="sp/SAML2/InitSSO/Redirect">Init SAML 2 SSO, Redirect Binding</a></li>
[... 10 lines stripped ...]
More information about the commits
mailing list