From 8eb33b5ca6ac276a5e368c754546e5d400aa1759 Mon Sep 17 00:00:00 2001 From: Nick Couchman Date: Fri, 3 Feb 2017 13:13:02 -0500 Subject: [PATCH] GUACAMOLE-195: Remove call to getRemoteUser() and just use the configured HTTP header. --- .../auth/header/AuthenticationProviderService.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/extensions/guacamole-auth-header/src/main/java/org/apache/guacamole/auth/header/AuthenticationProviderService.java b/extensions/guacamole-auth-header/src/main/java/org/apache/guacamole/auth/header/AuthenticationProviderService.java index 2625efd81..a4acc9b66 100644 --- a/extensions/guacamole-auth-header/src/main/java/org/apache/guacamole/auth/header/AuthenticationProviderService.java +++ b/extensions/guacamole-auth-header/src/main/java/org/apache/guacamole/auth/header/AuthenticationProviderService.java @@ -70,13 +70,10 @@ public class AuthenticationProviderService { // Pull HTTP header from request if present HttpServletRequest request = credentials.getRequest(); if(request != null) { - // Try getRemoteUser(), first - String username = request.getRemoteUser(); - // Check if that worked, if not, try the configured header. - if(username == null) - username = request.getHeader(confService.getHttpAuthHeader()); + // Get the username from the header configured in guacamole.properties + String username = request.getHeader(confService.getHttpAuthHeader()); - if (username != null) { + if(username != null) { AuthenticatedUser authenticatedUser = authenticatedUserProvider.get(); authenticatedUser.init(username, credentials); return authenticatedUser;