[java-identity-provider COMMIT] in /trunk/idp-conf/src: main/resources/system/flows/cas/login/login-beans.xml main/re...

noreply at shibboleth.net noreply at shibboleth.net
Mon Nov 10 18:50:20 EST 2014


Author: serac
Date: Mon Nov 10 18:50:20 2014
New Revision: 6873

URL: http://svn.shibboleth.net/view/java-identity-provider?rev=6873&view=rev
Log:
Add CAS login flow tests.

Added:
    trunk/idp-conf/src/test/java/net/shibboleth/idp/test/flows/cas/LoginFlowTest.java
      - copied, changed from r6866, trunk/idp-conf/src/test/java/net/shibboleth/idp/test/flows/cas/ProxyFlowTest.java
Modified:
    trunk/idp-conf/src/main/resources/system/flows/cas/login/login-beans.xml
    trunk/idp-conf/src/main/resources/system/flows/cas/login/login-flow.xml

Modified: trunk/idp-conf/src/main/resources/system/flows/cas/login/login-beans.xml
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-conf/src/main/resources/system/flows/cas/login/login-beans.xml?rev=6873&r1=6872&r2=6873&view=diff
==============================================================================
--- trunk/idp-conf/src/main/resources/system/flows/cas/login/login-beans.xml (original)
+++ trunk/idp-conf/src/main/resources/system/flows/cas/login/login-beans.xml Mon Nov 10 18:50:20 2014
@@ -2,6 +2,7 @@
 <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:c="http://www.springframework.org/schema/c"
+       xmlns:p="http://www.springframework.org/schema/p"
        xsi:schemaLocation="
            http://www.springframework.org/schema/beans
            http://www.springframework.org/schema/beans/spring-beans.xsd"
@@ -23,4 +24,11 @@
           class="net.shibboleth.idp.cas.flow.GrantServiceTicketAction"
           c:ticketService-ref="cas.ticketService" />
 
+    <bean id="populateSessionContext"
+          class="net.shibboleth.idp.session.impl.PopulateSessionContext"
+          scope="prototype"
+          p:activationCondition="%{idp.session.enabled:true}"
+          p:httpServletRequest-ref="shibboleth.HttpServletRequest"
+          p:sessionResolver-ref="shibboleth.SessionManager" />
+
 </beans>

Modified: trunk/idp-conf/src/main/resources/system/flows/cas/login/login-flow.xml
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-conf/src/main/resources/system/flows/cas/login/login-flow.xml?rev=6873&r1=6872&r2=6873&view=diff
==============================================================================
--- trunk/idp-conf/src/main/resources/system/flows/cas/login/login-flow.xml (original)
+++ trunk/idp-conf/src/main/resources/system/flows/cas/login/login-flow.xml Mon Nov 10 18:50:20 2014
@@ -6,12 +6,15 @@
 
     <action-state id="initializeLogin">
         <evaluate expression="initProfileRequestContext"/>
+        <evaluate expression="populateSessionContext"/>
         <evaluate expression="initializeLoginAction" />
         <evaluate expression="buildRelyingPartyContextAction" />
+        <evaluate expression="selectRelyingPartyConfiguration" />
         <evaluate expression="selectProfileConfiguration" />
         <evaluate expression="publishProtocolRequestAction" />
         <evaluate expression="'proceed'" />
         <transition on="proceed" to="checkAuthenticationRequired" />
+        <transition on="serviceNotSpecified" to="error" />
     </action-state>
 
     <action-state id="checkAuthenticationRequired">
@@ -44,11 +47,23 @@
             <evaluate expression="publishProtocolResponseAction" />
         </on-entry>
     </end-state>
-    <end-state id="gatewayRedirect" view="externalRedirect:#{requestScope.serviceTicketRequest.service}">
+    <end-state id="gatewayRedirect" view="externalRedirect:#{requestScope.serviceTicketRequest.service}" />
+    <end-state id="error" view="error">
         <on-entry>
-            <evaluate expression="publishProtocolResponseAction" />
+            <evaluate expression="opensamlProfileRequestContext" result="requestScope.profileRequestContext" />
+            <evaluate expression="T(net.shibboleth.utilities.java.support.codec.HTMLEncoder)" result="requestScope.encoder" />
+            <evaluate expression="flowRequestContext.getExternalContext().getNativeRequest()" result="requestScope.request" />
+            <evaluate expression="flowRequestContext.getExternalContext().getNativeResponse()" result="requestScope.response" />
         </on-entry>
     </end-state>
+
+    <global-transitions>
+        <transition on-exception="java.lang.IllegalStateException" to="error" />
+        <transition on="#{currentEvent.id.startsWith('Invalid') or currentEvent.id.startsWith('Unable')}"
+                    to="error" />
+        <transition on="illegalState" to="error" />
+        <transition on="protocolViolation" to="error" />
+    </global-transitions>
 
     <bean-import resource="login-beans.xml" />
 

Copied: trunk/idp-conf/src/test/java/net/shibboleth/idp/test/flows/cas/LoginFlowTest.java (from r6866, trunk/idp-conf/src/test/java/net/shibboleth/idp/test/flows/cas/ProxyFlowTest.java)

[... 160 lines stripped ...]


More information about the commits mailing list