mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-07 21:51:23 +00:00
GUACAMOLE-103: Read entity ID and callback URL from properties only if needed.
This commit is contained in:
@@ -332,11 +332,16 @@ public class ConfigurationService {
|
|||||||
Constants.BINDING_HTTP_REDIRECT);
|
Constants.BINDING_HTTP_REDIRECT);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Common settings, required with or without metadata file.
|
// Read entity ID from properties if not provided within metadata XML
|
||||||
samlMap.put(SettingsBuilder.SP_ENTITYID_PROPERTY_KEY,
|
if (!samlMap.containsKey(SettingsBuilder.SP_ENTITYID_PROPERTY_KEY)) {
|
||||||
getEntityId().toString());
|
samlMap.put(SettingsBuilder.SP_ENTITYID_PROPERTY_KEY, getEntityId().toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
// Derive ACS URL from properties if not provided within metadata XML
|
||||||
|
if (!samlMap.containsKey(SettingsBuilder.SP_ASSERTION_CONSUMER_SERVICE_URL_PROPERTY_KEY)) {
|
||||||
samlMap.put(SettingsBuilder.SP_ASSERTION_CONSUMER_SERVICE_URL_PROPERTY_KEY,
|
samlMap.put(SettingsBuilder.SP_ASSERTION_CONSUMER_SERVICE_URL_PROPERTY_KEY,
|
||||||
UriBuilder.fromUri(getCallbackUrl()).path("api/ext/saml/callback").build().toString());
|
UriBuilder.fromUri(getCallbackUrl()).path("api/ext/saml/callback").build().toString());
|
||||||
|
}
|
||||||
|
|
||||||
SettingsBuilder samlBuilder = new SettingsBuilder();
|
SettingsBuilder samlBuilder = new SettingsBuilder();
|
||||||
Saml2Settings samlSettings = samlBuilder.fromValues(samlMap).build();
|
Saml2Settings samlSettings = samlBuilder.fromValues(samlMap).build();
|
||||||
|
Reference in New Issue
Block a user