mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged HEAD-BUG-FIX (5.0/Cloud) to HEAD (5.0/Cloud)
77207: Merged PLATFORM1 (5.0/Cloud) to HEAD-BUG-FIX (5.0/Cloud) 75127: Test a fix for oauth breakage in Cloud build git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@78063 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -38,7 +38,10 @@ public class PublicApiAuthenticatorFactory extends BasicHttpAuthenticatorFactory
|
||||
private static Log logger = LogFactory.getLog(PublicApiAuthenticatorFactory.class);
|
||||
|
||||
public static final String DEFAULT_AUTHENTICATOR_KEY_HEADER = "X-Alfresco-Authenticator-Key";
|
||||
|
||||
|
||||
public static final String DEFAULT_REMOTE_USER_HEADER = "X-Alfresco-Remote-User";
|
||||
|
||||
private String remoteUserHeader = DEFAULT_REMOTE_USER_HEADER;
|
||||
private String authenticatorKeyHeader = DEFAULT_AUTHENTICATOR_KEY_HEADER;
|
||||
private RemoteUserMapper remoteUserMapper;
|
||||
private RetryingTransactionHelper retryingTransactionHelper;
|
||||
@@ -170,6 +173,12 @@ public class PublicApiAuthenticatorFactory extends BasicHttpAuthenticatorFactory
|
||||
{
|
||||
userId = remoteUserMapper.getRemoteUser(this.servletReq.getHttpServletRequest());
|
||||
}
|
||||
else
|
||||
{
|
||||
// fall back to extracting the header
|
||||
userId = servletReq.getHeader(remoteUserHeader);
|
||||
}
|
||||
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
if (userId == null)
|
||||
|
Reference in New Issue
Block a user