mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 05:07:41 +00:00
GUACAMOLE-839: Ensure all SSO and related mechanisms set Credentials username.
This is necessary to ensure the ${GUAC_USERNAME} token is properly substituted in cases where SSO and SSO-like auth methods are used.
This commit is contained in:
@@ -66,9 +66,15 @@ public class AuthenticationProviderService {
|
||||
// Get the username from the header configured in guacamole.properties
|
||||
String username = credentials.getHeader(confService.getHttpAuthHeader());
|
||||
if (username != null) {
|
||||
|
||||
// Update credentials with username provided via header for sake of
|
||||
// ${GUAC_USERNAME} token
|
||||
credentials.setUsername(username);
|
||||
|
||||
AuthenticatedUser authenticatedUser = authenticatedUserProvider.get();
|
||||
authenticatedUser.init(username, credentials);
|
||||
return authenticatedUser;
|
||||
|
||||
}
|
||||
|
||||
// Authentication not provided via header, yet, so we request it.
|
||||
|
Reference in New Issue
Block a user