You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rave.apache.org by ja...@apache.org on 2011/08/16 15:26:59 UTC
svn commit: r1158264 - in /incubator/rave/trunk/rave-portal/src/main/webapp:
WEB-INF/applicationContext-security.xml login.jsp
Author: jasha
Date: Tue Aug 16 13:26:58 2011
New Revision: 1158264
URL: http://svn.apache.org/viewvc?rev=1158264&view=rev
Log:
RAVE-118 display error message after unsuccessful login attempt
Modified:
incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/applicationContext-security.xml
incubator/rave/trunk/rave-portal/src/main/webapp/login.jsp
Modified: incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/applicationContext-security.xml
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/applicationContext-security.xml?rev=1158264&r1=1158263&r2=1158264&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/applicationContext-security.xml (original)
+++ incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/applicationContext-security.xml Tue Aug 16 13:26:58 2011
@@ -37,7 +37,7 @@
<!-- all urls must be authenticated -->
<security:intercept-url pattern="/**"
access="isAuthenticated()"/>
- <security:openid-login user-service-ref="userService">
+ <security:openid-login user-service-ref="userService" authentication-failure-url="/login.jsp?authfail=openid">
<security:attribute-exchange>
<!-- Supported by MyOpenID.com -->
<security:openid-attribute name="firstName" type="http://schema.openid.net/namePerson/first"/>
@@ -51,7 +51,7 @@
-->
</security:attribute-exchange>
</security:openid-login>
- <security:form-login login-page="/login.jsp" />
+ <security:form-login login-page="/login.jsp" authentication-failure-url="/login.jsp?authfail=form" />
<security:logout/>
</security:http>
Modified: incubator/rave/trunk/rave-portal/src/main/webapp/login.jsp
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/webapp/login.jsp?rev=1158264&r1=1158263&r2=1158264&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal/src/main/webapp/login.jsp (original)
+++ incubator/rave/trunk/rave-portal/src/main/webapp/login.jsp Tue Aug 16 13:26:58 2011
@@ -25,6 +25,9 @@
<h2>Username and Password</h2>
<form id="loginForm" name="loginForm" action="j_spring_security_check" method="post">
+ <c:if test="${param['authfail'] eq 'form'}">
+ <p class="error">The username or password is incorrect.</p>
+ </c:if>
<fieldset>
<p>
<label for="usernameField">Username: </label>
@@ -42,7 +45,7 @@
</form>
<h2>New User</h2>
- <form id="newAccount" action="/portal/app/newaccount.jsp" method="get">
+ <form id="newAccount" action="<c:url value="/app/newaccount.jsp"/>" method="get">
<fieldset>
<p>
<label for="createNewAccountButton">Register: </label>
@@ -53,6 +56,9 @@
<h2>OpenID Identity</h2>
<form id="oidForm" name='oidf' action='j_spring_openid_security_check' method='POST'>
+ <c:if test="${param['authfail'] eq 'openid'}">
+ <p class="error">OpenID identification failed.</p>
+ </c:if>
<fieldset>
<p>
<label for="openid_identifier">Identity: </label>