mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged HEAD-BUG-FIX (5.1/Cloud) to HEAD (5.1/Cloud)
93534: Merged 5.0.N (5.0.1) to HEAD-BUG-FIX (5.1/Cloud) 93421: MNT-12982: Merged DEV to 5.0.N (5.0.1) 93385: MNT-12982: WQS unable to connect to repository - Return back empty username which is required for authentication via tickets. For SSO fallbacks do ticket validation if credential is the ticket. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@94964 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2014 Alfresco Software Limited.
|
||||
* Copyright (C) 2005-2015 Alfresco Software Limited.
|
||||
*
|
||||
* This file is part of Alfresco
|
||||
*
|
||||
@@ -30,6 +30,7 @@ import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.repo.SessionUser;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationException;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||
import org.alfresco.repo.security.authentication.Authorization;
|
||||
import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
@@ -115,7 +116,15 @@ public class SSOFallbackBasicAuthenticationDriver implements AuthenticationDrive
|
||||
if (logger.isDebugEnabled())
|
||||
logger.debug("Authenticating user '" + username + "'");
|
||||
|
||||
authenticationService.authenticate(username, password.toCharArray());
|
||||
Authorization auth = new Authorization(username, password);
|
||||
if (auth.isTicket())
|
||||
{
|
||||
authenticationService.validate(auth.getTicket());
|
||||
}
|
||||
else
|
||||
{
|
||||
authenticationService.authenticate(username, password.toCharArray());
|
||||
}
|
||||
|
||||
final RetryingTransactionCallback<SessionUser> callback = new RetryingTransactionCallback<SessionUser>()
|
||||
{
|
||||
|
Reference in New Issue
Block a user