Merged 5.1-MC1 (5.1.0) to HEAD (5.1)

119054 adavis: Merged 5.1.N (5.1.1) to 5.1-MC1 (5.1.0)
      117336 adavis: Merged 5.0.2-CLOUD42 (Cloud ) to 5.1.N (5.1.1)
         117244 adavis: Merged 5.0.2-CLOUD (Cloud ) to 5.0.2-CLOUD42 (Cloud )
            114513 adavis: Merged BCRYPT to 5.0.2-CLOUD
               113804 gcornwell: MNT-14892: More test fixes


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@119892 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jean-Pierre Huynh
2015-12-10 09:59:09 +00:00
parent eda3bd18fc
commit 5cd45df966
2 changed files with 27 additions and 2 deletions

View File

@@ -103,12 +103,13 @@ public class AuthenticationComponentImpl extends AbstractAuthenticationComponent
public String doWork() throws Exception
{
String normalized = getPersonService().getUserIdentifier(userName);
String finalUserName = normalized == null ? userName : normalized;
UsernamePasswordAuthenticationToken authentication = new UsernamePasswordAuthenticationToken(
normalized == null ? userName : normalized, new String(password));
finalUserName, new String(password));
authenticationManager.authenticate(authentication);
// check whether the user's password requires re-hashing
UserDetails userDetails = authenticationDao.loadUserByUsername(userName);
UserDetails userDetails = authenticationDao.loadUserByUsername(finalUserName);
if (userDetails instanceof RepositoryAuthenticatedUser)
{
List<String> hashIndicator = ((RepositoryAuthenticatedUser)userDetails).getHashIndicator();