mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
GUACAMOLE-195: Remove call to getRemoteUser() and just use the configured HTTP header.
This commit is contained in:
@@ -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