mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Authentication service fix.
Clean context if login fails or ticket validation falis git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2030 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -88,7 +88,15 @@ public class AuthenticationServiceImpl implements AuthenticationService
|
||||
|
||||
public void authenticate(String userName, char[] password) throws AuthenticationException
|
||||
{
|
||||
authenticationComponent.authenticate(userName, password);
|
||||
try
|
||||
{
|
||||
authenticationComponent.authenticate(userName, password);
|
||||
}
|
||||
catch(AuthenticationException ae)
|
||||
{
|
||||
clearCurrentSecurityContext();
|
||||
throw ae;
|
||||
}
|
||||
}
|
||||
|
||||
public String getCurrentUserName() throws AuthenticationException
|
||||
@@ -108,7 +116,15 @@ public class AuthenticationServiceImpl implements AuthenticationService
|
||||
|
||||
public void validate(String ticket) throws AuthenticationException
|
||||
{
|
||||
authenticationComponent.setCurrentUser(ticketComponent.validateTicket(ticket));
|
||||
try
|
||||
{
|
||||
authenticationComponent.setCurrentUser(ticketComponent.validateTicket(ticket));
|
||||
}
|
||||
catch(AuthenticationException ae)
|
||||
{
|
||||
clearCurrentSecurityContext();
|
||||
throw ae;
|
||||
}
|
||||
}
|
||||
|
||||
public String getCurrentTicket()
|
||||
|
Reference in New Issue
Block a user