[java-idp-testbed COMMIT] in /trunk/src/main: resources/conf/mvc-beans.xml resources/flows/authn/jaas-form-authn-flow...

noreply at shibboleth.net noreply at shibboleth.net
Thu Oct 31 17:12:34 EDT 2013


Author: scantor
Date: Thu Oct 31 17:12:34 2013
New Revision: 33

URL: http://svn.shibboleth.net/view/java-idp-testbed?rev=33&view=rev
Log:
Fixing up view templates and injection of view scoped data.

Modified:
    trunk/src/main/resources/conf/mvc-beans.xml
    trunk/src/main/resources/flows/authn/jaas-form-authn-flow.xml
    trunk/src/main/resources/views/login.vm
    trunk/src/main/webapp/WEB-INF/idp/jsp/login.jsp

Modified: trunk/src/main/resources/conf/mvc-beans.xml
URL: http://svn.shibboleth.net/view/java-idp-testbed/trunk/src/main/resources/conf/mvc-beans.xml?rev=33&r1=32&r2=33&view=diff
==============================================================================
--- trunk/src/main/resources/conf/mvc-beans.xml (original)
+++ trunk/src/main/resources/conf/mvc-beans.xml Thu Oct 31 17:12:34 2013
@@ -68,7 +68,7 @@
 
     <bean id="shibboleth.InternalViewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
         <property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/>
-        <property name="prefix" value="/WEB-INF/jsp/"/>
+        <property name="prefix" value="/WEB-INF/idp/jsp/"/>
         <property name="suffix" value=".jsp"/>
     </bean>
 

Modified: trunk/src/main/resources/flows/authn/jaas-form-authn-flow.xml
URL: http://svn.shibboleth.net/view/java-idp-testbed/trunk/src/main/resources/flows/authn/jaas-form-authn-flow.xml?rev=33&r1=32&r2=33&view=diff
==============================================================================
--- trunk/src/main/resources/flows/authn/jaas-form-authn-flow.xml (original)
+++ trunk/src/main/resources/flows/authn/jaas-form-authn-flow.xml Thu Oct 31 17:12:34 2013
@@ -13,14 +13,10 @@
     
     <view-state id="DisplayUsernamePasswordPage" view="login">
         <on-render>
-            <!--
-            TODO: Eventually would like to populate subcontexts directly into viewScope, but they aren't Serializable.
-            For now, I'm injecting some class types so a Velocity template can navigate the context tree. 
-            -->
-            <evaluate expression="T(net.shibboleth.idp.authn.context.AuthenticationContext)" result="viewScope.classAuthenticationContext" />
-            <evaluate expression="T(net.shibboleth.idp.authn.context.AuthenticationErrorContext)" result="viewScope.classAuthenticationErrorContext" />
-            <!-- This should work once we fix the serializability requirement for view scope. -->
-            <!-- <evaluate expression="T(org.owasp.esapi.ESAPI).encoder()" result="viewScope.esapiEncoder" />  -->
+            <evaluate expression="flowRequestContext.getConversationScope().get('org.opensaml.profile.context.ProfileRequestContext')" result="viewScope.profileRequestContext" />
+            <evaluate expression="profileRequestContext.getSubcontext(T(net.shibboleth.idp.authn.context.AuthenticationContext), false)" result="viewScope.authenticationContext" />
+            <evaluate expression="authenticationContext.getSubcontext(T(net.shibboleth.idp.authn.context.AuthenticationErrorContext), false)" result="viewScope.authenticationErrorContext" />
+            <evaluate expression="T(org.owasp.esapi.ESAPI).encoder()" result="viewScope.esapiEncoder" />
         </on-render>
         <transition on="proceed" to="ExtractUsernamePasswordFromFormRequest" />
     </view-state>

Modified: trunk/src/main/resources/views/login.vm
URL: http://svn.shibboleth.net/view/java-idp-testbed/trunk/src/main/resources/views/login.vm?rev=33&r1=32&r2=33&view=diff
==============================================================================
--- trunk/src/main/resources/views/login.vm (original)
+++ trunk/src/main/resources/views/login.vm Thu Oct 31 17:12:34 2013
@@ -6,17 +6,14 @@
 ## flowRequestContext - the Spring Web Flow RequestContext
 ## flowExecutionKey - the SWF execution key (this is built into the flowExecutionUrl)
 
-#set ( $profileRequestContext = $flowRequestContext.getConversationScope().get("org.opensaml.profile.context.ProfileRequestContext") )
-#set ( $authnContext = $profileRequestContext.getSubcontext($flowRequestContext.getViewScope().get("classAuthenticationContext", false)) )
-#set ( $errorContext = $authnContext.getSubcontext($flowRequestContext.getViewScope().get("classAuthenticationErrorContext", false)) )
 
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
     <body>
     
     <h2>Testbed Login</h2>
 
-#if ( $errorContext && $errorContext.getExceptions().size() > 0 )
-		<p>ERROR: $errorContext.getExceptions().get(0).getMessage()</p>
+#if ( $authenticationErrorContext && $authenticationErrorContext.getExceptions().size() > 0 )
+		<p>ERROR: $esapiEncoder.encodeForHTML($authenticationErrorContext.getExceptions().get(0).getMessage())</p>
 #end
         
         <form action="$flowExecutionUrl" method="post">

Modified: trunk/src/main/webapp/WEB-INF/idp/jsp/login.jsp
URL: http://svn.shibboleth.net/view/java-idp-testbed/trunk/src/main/webapp/WEB-INF/idp/jsp/login.jsp?rev=33&r1=32&r2=33&view=diff
==============================================================================

[... 39 lines stripped ...]


More information about the commits mailing list