[java-identity-provider COMMIT] in /trunk/idp-conf/src/main/resources: flows/authn/jaas-form-authn-flow.xml views/log...

noreply at shibboleth.net noreply at shibboleth.net
Thu Oct 31 17:14:32 EDT 2013


Author: scantor
Date: Thu Oct 31 17:14:32 2013
New Revision: 4919

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

Modified:
    trunk/idp-conf/src/main/resources/flows/authn/jaas-form-authn-flow.xml
    trunk/idp-conf/src/main/resources/views/login.vm

Modified: trunk/idp-conf/src/main/resources/flows/authn/jaas-form-authn-flow.xml
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-conf/src/main/resources/flows/authn/jaas-form-authn-flow.xml?rev=4919&r1=4918&r2=4919&view=diff
==============================================================================
--- trunk/idp-conf/src/main/resources/flows/authn/jaas-form-authn-flow.xml (original)
+++ trunk/idp-conf/src/main/resources/flows/authn/jaas-form-authn-flow.xml Thu Oct 31 17:14:32 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/idp-conf/src/main/resources/views/login.vm
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-conf/src/main/resources/views/login.vm?rev=4919&r1=4918&r2=4919&view=diff
==============================================================================
--- trunk/idp-conf/src/main/resources/views/login.vm (original)
+++ trunk/idp-conf/src/main/resources/views/login.vm Thu Oct 31 17:14:32 2013
@@ -6,22 +6,22 @@
 ## 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>
-        
-#if ( $errorContext && $errorContext.getExceptions().size() > 0 )
-		<p>ERROR: $errorContext.getExceptions().get(0).getMessage()</p>
+    
+    <h2>Testbed Login</h2>
+
+#if ( $authenticationErrorContext && $authenticationErrorContext.getExceptions().size() > 0 )
+		<p>ERROR: $esapiEncoder.encodeForHTML($authenticationErrorContext.getExceptions().get(0).getMessage())</p>
 #end
         
         <form action="$flowExecutionUrl" method="post">
             Username: <input type="text" name="username" value=""/> <br/>
             Password: <input type="password" name="password" value=""/> <br/>
             
-            <input type="submit" name="_eventId_proceed" value="Login"/>
+            <input type="submit" name="_eventId_proceed" value="Login"/> <br/>
+            <input type="checkbox" name="donotcache" value="1" /> Don't Remember Login
         </form>
         
     </body>



More information about the commits mailing list