[java-idp-testbed COMMIT] in /trunk/src/main: resources/conf/authn-flow-descriptors.xml resources/flows/authn/jaas-ba...
noreply at shibboleth.net
noreply at shibboleth.net
Mon Nov 4 20:27:50 EST 2013
Author: scantor
Date: Mon Nov 4 20:27:50 2013
New Revision: 34
URL: http://svn.shibboleth.net/view/java-idp-testbed?rev=34&view=rev
Log:
Add classifying of error messages to config.
Modified:
trunk/src/main/resources/conf/authn-flow-descriptors.xml
trunk/src/main/resources/flows/authn/jaas-basic-authn-beans.xml
trunk/src/main/resources/flows/authn/jaas-form-authn-beans.xml
trunk/src/main/resources/views/login.vm
trunk/src/main/webapp/WEB-INF/idp/jsp/login.jsp
Modified: trunk/src/main/resources/conf/authn-flow-descriptors.xml
URL: http://svn.shibboleth.net/view/java-idp-testbed/trunk/src/main/resources/conf/authn-flow-descriptors.xml?rev=34&r1=33&r2=34&view=diff
==============================================================================
--- trunk/src/main/resources/conf/authn-flow-descriptors.xml (original)
+++ trunk/src/main/resources/conf/authn-flow-descriptors.xml Mon Nov 4 20:27:50 2013
@@ -81,6 +81,25 @@
</util:list>
<!--
+ Define entries here to map error messages thrown by authentication plugins like JAAS modules
+ and classify them as particular kinds of errors for use in your templates.
+ -->
+ <util:map id="shibboleth.ClassifiedMessageMap">
+ <entry key="UnknownUsername">
+ <list>
+ <value>CLIENT_NOT_FOUND</value>
+ <value>DN_RESOLUTION_FAILURE</value>
+ </list>
+ </entry>
+ <entry key="InvalidPassword">
+ <list>
+ <value>PREAUTH_FAILED</value>
+ <value>INVALID_CREDENTIALS</value>
+ </list>
+ </entry>
+ </util:map>
+
+ <!--
Defining this allows us to specify symbolic text replacements that shrink the size of results
saved to client-side storage such as cookies.
-->
Modified: trunk/src/main/resources/flows/authn/jaas-basic-authn-beans.xml
URL: http://svn.shibboleth.net/view/java-idp-testbed/trunk/src/main/resources/flows/authn/jaas-basic-authn-beans.xml?rev=34&r1=33&r2=34&view=diff
==============================================================================
--- trunk/src/main/resources/flows/authn/jaas-basic-authn-beans.xml (original)
+++ trunk/src/main/resources/flows/authn/jaas-basic-authn-beans.xml Mon Nov 4 20:27:50 2013
@@ -25,6 +25,7 @@
<bean id="ValidateUsernamePasswordAgainstJAAS" class="net.shibboleth.idp.authn.impl.ValidateUsernamePasswordAgainstJAAS" scope="prototype"
p:loginConfigName-ref="shibboleth.authn.JAAS.LoginConfigName" p:loginConfigType="JavaLoginConfig"
+ p:classifiedMessages-ref="shibboleth.ClassifiedMessageMap"
p:resultCachingPredicate="#{getObject('shibboleth.authn.JAAS.resultCachingPredicate')}" >
<property name="loginConfigParameters">
<bean class="java.security.URIParameter">
Modified: trunk/src/main/resources/flows/authn/jaas-form-authn-beans.xml
URL: http://svn.shibboleth.net/view/java-idp-testbed/trunk/src/main/resources/flows/authn/jaas-form-authn-beans.xml?rev=34&r1=33&r2=34&view=diff
==============================================================================
--- trunk/src/main/resources/flows/authn/jaas-form-authn-beans.xml (original)
+++ trunk/src/main/resources/flows/authn/jaas-form-authn-beans.xml Mon Nov 4 20:27:50 2013
@@ -28,6 +28,7 @@
<bean id="ValidateUsernamePasswordAgainstJAAS" class="net.shibboleth.idp.authn.impl.ValidateUsernamePasswordAgainstJAAS" scope="prototype"
p:loginConfigName-ref="shibboleth.authn.JAAS.LoginConfigName" p:loginConfigType="JavaLoginConfig"
+ p:classifiedMessages-ref="shibboleth.ClassifiedMessageMap"
p:resultCachingPredicate="#{getObject('shibboleth.authn.JAAS.resultCachingPredicate')}">
<property name="loginConfigParameters">
<bean class="java.security.URIParameter">
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=34&r1=33&r2=34&view=diff
==============================================================================
--- trunk/src/main/resources/views/login.vm (original)
+++ trunk/src/main/resources/views/login.vm Mon Nov 4 20:27:50 2013
@@ -15,6 +15,10 @@
#if ( $authenticationErrorContext && $authenticationErrorContext.getExceptions().size() > 0 )
<p>ERROR: $esapiEncoder.encodeForHTML($authenticationErrorContext.getExceptions().get(0).getMessage())</p>
#end
+
+#if ( $authenticationErrorContext && $authenticationErrorContext.getClassifiedErrors().size() > 0 )
+ <p>Classified errors: $authenticationErrorContext.getClassifiedErrors()</p>
+#end
<form action="$flowExecutionUrl" method="post">
Username: <input type="text" name="username" value=""/> <br/>
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=34&r1=33&r2=34&view=diff
==============================================================================
[... 14 lines stripped ...]
More information about the commits
mailing list