You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by at...@apache.org on 2005/04/24 14:33:49 UTC
cvs commit: jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/security PasswordCredential.java
ate 2005/04/24 05:33:49
Modified: components/security/src/java/org/apache/jetspeed/security/spi/impl
DefaultPasswordCredentialImpl.java
jetspeed-api/src/java/org/apache/jetspeed/security
PasswordCredential.java
Log:
Interface the authenticationFailures of the InternalCredential
see: http://issues.apache.org/jira/browse/JS2-239
Revision Changes Path
1.4 +12 -0 jakarta-jetspeed-2/components/security/src/java/org/apache/jetspeed/security/spi/impl/DefaultPasswordCredentialImpl.java
Index: DefaultPasswordCredentialImpl.java
===================================================================
RCS file: /home/cvs/jakarta-jetspeed-2/components/security/src/java/org/apache/jetspeed/security/spi/impl/DefaultPasswordCredentialImpl.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- DefaultPasswordCredentialImpl.java 25 Nov 2004 02:25:57 -0000 1.3
+++ DefaultPasswordCredentialImpl.java 24 Apr 2005 12:33:49 -0000 1.4
@@ -61,6 +61,9 @@
/** The last authentication in date */
private Timestamp lastAuthenticationDate;
+ /** The number of authentication failures */
+ private int authenticationFailures;
+
/**
* @param userName
* @param password
@@ -80,6 +83,7 @@
this.expirationDate = credential.getExpirationDate();
this.previousAuthenticationDate = credential.getPreviousAuthenticationDate();
this.lastAuthenticationDate = credential.getLastAuthenticationDate();
+ this.authenticationFailures = credential.getAuthenticationFailures();
}
/**
@@ -147,6 +151,14 @@
return lastAuthenticationDate;
}
+ /**
+ * @see org.apache.jetspeed.security.PasswordCredential#getAuthenticationFailures()
+ */
+ public int getAuthenticationFailures()
+ {
+ return authenticationFailures;
+ }
+
/**
* @see java.lang.Object#equals(java.lang.Object)
*/
1.3 +12 -1 jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/security/PasswordCredential.java
Index: PasswordCredential.java
===================================================================
RCS file: /home/cvs/jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/security/PasswordCredential.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- PasswordCredential.java 25 Nov 2004 02:25:57 -0000 1.2
+++ PasswordCredential.java 24 Apr 2005 12:33:49 -0000 1.3
@@ -68,4 +68,15 @@
* @return the last time the user logged in
*/
Timestamp getLastAuthenticationDate();
+
+ /**
+ * <p>Getter for the current number of authentication failures in a row.</p>
+ * <ul>
+ * <li>-1: never tried yet</li>
+ * <li> 0: none, or last attempt was successful</li>
+ * <li>>0: number of failures</li>
+ * </ul>
+ * @return The number of authentication failures
+ */
+ int getAuthenticationFailures();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org