GUACAMOLE-195: Remove call to getRemoteUser() and just use the configured HTTP header.
This commit is contained in:
1 parent
96fb8a9c6b
commit
8eb33b5ca6
1 file changed
+3
-6
+3
-6
@@ -70,13 +70,10 @@ public class AuthenticationProviderService {
|
|||||||
// Pull HTTP header from request if present
|
// Pull HTTP header from request if present
|
||||||
HttpServletRequest request = credentials.getRequest();
|
HttpServletRequest request = credentials.getRequest();
|
||||||
if(request != null) {
|
if(request != null) {
|
||||||
// Try getRemoteUser(), first
|
// Get the username from the header configured in guacamole.properties
|
||||||
String username = request.getRemoteUser();
|
String username = request.getHeader(confService.getHttpAuthHeader());
|
||||||
// Check if that worked, if not, try the configured header.
|
|
||||||
if(username == null)
|
|
||||||
username = request.getHeader(confService.getHttpAuthHeader());
|
|
||||||
|
|
||||||
if (username != null) {
|
if(username != null) {
|
||||||
AuthenticatedUser authenticatedUser = authenticatedUserProvider.get();
|
AuthenticatedUser authenticatedUser = authenticatedUserProvider.get();
|
||||||
authenticatedUser.init(username, credentials);
|
authenticatedUser.init(username, credentials);
|
||||||
return authenticatedUser;
|
return authenticatedUser;
|
||||||
|
|||||||
Reference in new issue
Block a user