Merged HEAD-BUG-FIX (4.3/Cloud) to HEAD (4.3/Cloud)

58327: Merged V4.2-BUG-FIX (4.2.1) to HEAD-BUG-FIX (Cloud/4.3)
      58317: Merged V4.1-BUG-FIX (4.1.8) to V4.2-BUG-FIX (4.2.1)
         58291: Merged V4.1.7 (4.1.7) to V4.1-BUG-FIX (4.1.8)
            58227: 58123: MNT-9992 : Using CMIS authentication using "ROLE_TICKET" or user "null" of "" does not work any more.
               - Removed check to see if already authenticated - Andy suggested


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@61964 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2014-02-11 23:15:46 +00:00
parent a9b65c3715
commit 53366c7e59

View File

@@ -163,19 +163,16 @@ public class AuthenticationFilter extends BaseAuthenticationFilter implements De
password = "";
}
// First check if we already are authenticated
if (AuthenticationUtil.getFullyAuthenticatedUser() == null)
// Go to the repo and authenticate
Authorization auth = new Authorization(username, password);
if (auth.isTicket())
{
// We have to go to the repo and authenticate
Authorization auth = new Authorization(username, password);
if (auth.isTicket())
{
authenticationService.validate(auth.getTicket());
}
else
{
authenticationService.authenticate(username, password.toCharArray());
authenticationListener.userAuthenticated(new BasicAuthCredentials(username, password));
authenticationService.validate(auth.getTicket());
}
else
{
authenticationService.authenticate(username, password.toCharArray());
authenticationListener.userAuthenticated(new BasicAuthCredentials(username, password));
}
user = createUserEnvironment(httpReq.getSession(), authenticationService.getCurrentUserName(), authenticationService.getCurrentTicket(), false);