taylor 2002/06/03 21:52:29
Modified: src/java/org/apache/jetspeed/services/registry Tag:
security_14 TestRegistryCategories.java
src/java/org/apache/jetspeed/services/security Tag:
security_14 TestPortalAuthentication.java
src/java/org/apache/jetspeed/services/security/turbine Tag:
security_14 TurbineAuthentication.java
Added: src/java/org/apache/jetspeed/services/security Tag:
security_14 TestUserManagement.java
Log:
- added unit test for UserManagement
Revision Changes Path
No revision
No revision
1.3.2.2 +2 -3
jakarta-jetspeed/src/java/org/apache/jetspeed/services/registry/TestRegistryCategories.java
Index: TestRegistryCategories.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/services/registry/TestRegistryCategories.java,v
retrieving revision 1.3.2.1
retrieving revision 1.3.2.2
diff -u -r1.3.2.1 -r1.3.2.2
--- TestRegistryCategories.java 26 May 2002 16:07:51 -0000 1.3.2.1
+++ TestRegistryCategories.java 4 Jun 2002 04:52:29 -0000 1.3.2.2
@@ -85,7 +85,7 @@
* TestRegistryCategories
*
* @author <a href="[EMAIL PROTECTED]">David Sean Taylor</a>
- * @version $Id: TestRegistryCategories.java,v 1.3.2.1 2002/05/26 16:07:51 taylor
Exp $
+ * @version $Id: TestRegistryCategories.java,v 1.3.2.2 2002/06/04 04:52:29 taylor
Exp $
*/
public class TestRegistryCategories extends TestCase {
@@ -146,8 +146,7 @@
count++;
}
System.out.println("[RSS] count = " + count);
- System.out.println("------------------");
-
+ System.out.println("------------------");
assertTrue(count == 6);
registry.removeEntry(pe);
No revision
No revision
1.1.2.2 +2 -1
jakarta-jetspeed/src/java/org/apache/jetspeed/services/security/Attic/TestPortalAuthentication.java
Index: TestPortalAuthentication.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/services/security/Attic/TestPortalAuthentication.java,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -r1.1.2.1 -r1.1.2.2
--- TestPortalAuthentication.java 30 May 2002 07:04:11 -0000 1.1.2.1
+++ TestPortalAuthentication.java 4 Jun 2002 04:52:29 -0000 1.1.2.2
@@ -76,7 +76,7 @@
* Unit test for PortalAuthentication interface
*
* @author <a href="mailto:[EMAIL PROTECTED]">David Sean Taylor</a>
- * @version $Id: TestPortalAuthentication.java,v 1.1.2.1 2002/05/30 07:04:11 taylor
Exp $
+ * @version $Id: TestPortalAuthentication.java,v 1.1.2.2 2002/06/04 04:52:29 taylor
Exp $
*/
public class TestPortalAuthentication extends TestCase {
@@ -168,6 +168,7 @@
}
catch (Exception e)
{
+ e.printStackTrace();
loggedOn = false;
}
No revision
No revision
1.1.2.1 +197 -0
jakarta-jetspeed/src/java/org/apache/jetspeed/services/security/Attic/TestUserManagement.java
No revision
No revision
1.1.2.4 +7 -4
jakarta-jetspeed/src/java/org/apache/jetspeed/services/security/turbine/Attic/TurbineAuthentication.java
Index: TurbineAuthentication.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/services/security/turbine/Attic/TurbineAuthentication.java,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -u -r1.1.2.3 -r1.1.2.4
--- TurbineAuthentication.java 4 Jun 2002 02:43:36 -0000 1.1.2.3
+++ TurbineAuthentication.java 4 Jun 2002 04:52:29 -0000 1.1.2.4
@@ -93,7 +93,7 @@
* This service does not use any of the Turbine security or user management classes.
*
* @author <a href="mailto:[EMAIL PROTECTED]">David Sean Taylor</a>
- * @version $Id: TurbineAuthentication.java,v 1.1.2.3 2002/06/04 02:43:36 taylor
Exp $
+ * @version $Id: TurbineAuthentication.java,v 1.1.2.4 2002/06/04 04:52:29 taylor
Exp $
*/
public class TurbineAuthentication extends TurbineBaseService
@@ -155,11 +155,14 @@
throw new LoginException(e.toString());
}
// validated ok, encrypt if necessary
- String encrypted = encryptPassword(password, this.passwordsAlgorithm);
- if(!user.getPassword().equals(encrypted))
+ if (securePasswords)
{
- throw new FailedLoginException("Credential authentication failure");
+ password = encryptPassword(password, this.passwordsAlgorithm);
}
+ if(!user.getPassword().equals(password))
+ {
+ throw new FailedLoginException("Credential authentication failure");
+ }
return user;
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>