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

@@ -7,7 +7,7 @@
<!-- Web Script Beans --> <!-- Web Script Beans -->
<!-- ===================================== --> <!-- ===================================== -->
<!-- Alfresco Web Client Authenticator (Servlet based) --> <!-- Alfresco Web Client Authenticator (Servlet based - Session) -->
<bean id="webscripts.authenticator.webclient" class="org.alfresco.repo.web.scripts.servlet.WebClientAuthenticatorFactory" /> <bean id="webscripts.authenticator.webclient" class="org.alfresco.repo.web.scripts.servlet.WebClientAuthenticatorFactory" />
<bean id="webscripts.authenticator.jsr168.webclient" class="org.alfresco.repo.web.scripts.portlet.WebClientPortletAuthenticatorFactory" lazy-init="true"/> <bean id="webscripts.authenticator.jsr168.webclient" class="org.alfresco.repo.web.scripts.portlet.WebClientPortletAuthenticatorFactory" lazy-init="true"/>

View File

@@ -41,6 +41,10 @@ import org.springframework.web.context.ServletContextAware;
/** /**
* Alfresco Web Client Authentication * 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 * @author davidc
*/ */
public class WebClientAuthenticatorFactory implements ServletAuthenticatorFactory, ServletContextAware public class WebClientAuthenticatorFactory implements ServletAuthenticatorFactory, ServletContextAware
@@ -179,6 +183,12 @@ public class WebClientAuthenticatorFactory implements ServletAuthenticatorFactor
{ {
return (ticket == null || ticket.length() == 0); return (ticket == null || ticket.length() == 0);
} }
@Override
public String toString()
{
return servletReq.toString() + " [ticket=" + ticket + "]";
}
} }
} }

View File

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

View File

@@ -288,7 +288,7 @@
<servlet-class>org.springframework.extensions.webscripts.servlet.WebScriptServlet</servlet-class> <servlet-class>org.springframework.extensions.webscripts.servlet.WebScriptServlet</servlet-class>
<init-param> <init-param>
<param-name>authenticator</param-name> <param-name>authenticator</param-name>
<param-value>webscripts.authenticator.basic</param-value> <param-value>webscripts.authenticator.remoteuser</param-value>
</init-param> </init-param>
</servlet> </servlet>