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

90919: MNT-12764 - The X-Alfresco-Remote-User (SsoUserHeader) SSO code path executes x2 requests and is stateful when it does not need to be
   Merged PROPERTY_GROUP_PROTOTYPING (5.0/Cloud) to HEAD-BUG-FIX (5.0/Cloud)
      90559: Refactoring of SSO paths
       - Web-client mappings for new authenticator


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@94742 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2015-01-31 11:07:05 +00:00
parent 41d2fdb3a9
commit 04eb119eff
5 changed files with 20 additions and 4 deletions

View File

@@ -41,6 +41,10 @@ import org.springframework.web.context.ServletContextAware;
/**
* Alfresco Web Client Authentication
*
* NOTE: 5.0 - Explorer client has been removed - as have the JSF bean definitions. This effectively mean this is now just
* a web Session based authenticator - ticket and user wrapper is stored in a Session and the JSESSIONID cookie is returned.
* No user prefs for language etc. are set due to the removal of Explorer beans.
*
* @author davidc
*/
public class WebClientAuthenticatorFactory implements ServletAuthenticatorFactory, ServletContextAware
@@ -179,6 +183,12 @@ public class WebClientAuthenticatorFactory implements ServletAuthenticatorFactor
{
return (ticket == null || ticket.length() == 0);
}
@Override
public String toString()
{
return servletReq.toString() + " [ticket=" + ticket + "]";
}
}
}

View File

@@ -587,7 +587,7 @@ public final class AuthenticationHelper
if (sessionUser instanceof User)
{
user = (User)sessionUser;
setExternalAuth(session, userId != null);
setExternalAuth(session, userId != null);
}
else
{
@@ -654,7 +654,7 @@ public final class AuthenticationHelper
logger.debug("Invalidating the session.");
session.invalidate();
}
}
}
}
}
return user;

View File

@@ -312,4 +312,10 @@ public final class User implements SessionUser
return nameAndId.toString();
}
@Override
public String toString()
{
return this.userName;
}
}