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/BRANCHES/DEV/5.1.N/root@117336 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2015-11-11 17:50:34 +00:00
parent 4ef78ff58f
commit 38c51705ab
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();