GUACAMOLE-195: Remove call to getRemoteUser() and just use the configured HTTP header.

This commit is contained in:
Nick Couchman
2017-02-03 13:13:02 -05:00
parent 96fb8a9c6b
commit 8eb33b5ca6

View File

@@ -70,11 +70,8 @@ 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) {
AuthenticatedUser authenticatedUser = authenticatedUserProvider.get();