mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Merged V2.2. to HEAD
7236: Merged V2.1 to V2.2 7205: Typos and fixed Italian messages 7234: Fix AR-1824 (Login ticket stuff) 7235: Fix for AWC-1513 and AWC-1139 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@7237 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -465,6 +465,8 @@ public class AuthenticationTest extends TestCase
|
||||
// assertNull(dao.getUserOrNull("Andy"));
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void testTicket()
|
||||
{
|
||||
dao.createUser("Andy", "ticket".toCharArray());
|
||||
@@ -702,6 +704,32 @@ public class AuthenticationTest extends TestCase
|
||||
// assertNull(dao.getUserOrNull("Andy"));
|
||||
|
||||
}
|
||||
|
||||
public void testAuthenticationServiceGetNewTicket()
|
||||
{
|
||||
authenticationService.createAuthentication("GUEST", "".toCharArray());
|
||||
authenticationService.authenticate("GUEST", "".toCharArray());
|
||||
|
||||
// create an authentication object e.g. the user
|
||||
authenticationService.createAuthentication("Andy", "auth1".toCharArray());
|
||||
|
||||
// authenticate with this user details
|
||||
authenticationService.authenticate("Andy", "auth1".toCharArray());
|
||||
|
||||
// assert the user is authenticated
|
||||
assertEquals("Andy", authenticationService.getCurrentUserName());
|
||||
|
||||
String ticket1 = authenticationService.getCurrentTicket();
|
||||
|
||||
authenticationService.authenticate("Andy", "auth1".toCharArray());
|
||||
|
||||
// assert the user is authenticated
|
||||
assertEquals("Andy", authenticationService.getCurrentUserName());
|
||||
|
||||
String ticket2 = authenticationService.getCurrentTicket();
|
||||
|
||||
assertFalse(ticket1.equals(ticket2));
|
||||
}
|
||||
|
||||
public void testAuthenticationService1()
|
||||
{
|
||||
|
Reference in New Issue
Block a user