summaryrefslogtreecommitdiffstats
path: root/auth_mellon_config.c
diff options
context:
space:
mode:
Diffstat (limited to 'auth_mellon_config.c')
-rw-r--r--auth_mellon_config.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/auth_mellon_config.c b/auth_mellon_config.c
index 19ae37c..91ccbec 100644
--- a/auth_mellon_config.c
+++ b/auth_mellon_config.c
@@ -1064,6 +1064,13 @@ const command_rec auth_mellon_commands[] = {
OR_AUTHCFG,
"List of IdP entityId to ignore."
),
+ AP_INIT_TAKE1(
+ "MellonSPentityId",
+ ap_set_string_slot,
+ (void *)APR_OFFSETOF(am_dir_cfg_rec, sp_entity_id),
+ OR_AUTHCFG,
+ "SP entity Id to be used for metadata auto generation."
+ ),
AP_INIT_TAKE12(
"MellonOrganizationName",
am_set_langstring_slot,
@@ -1231,6 +1238,7 @@ void *auth_mellon_dir_config(apr_pool_t *p, char *d)
dir->probe_discovery_timeout = -1; /* -1 means no probe discovery */
dir->probe_discovery_idp = apr_table_make(p, 0);
+ dir->sp_entity_id = NULL;
dir->sp_org_name = apr_hash_make(p);
dir->sp_org_display_name = apr_hash_make(p);
dir->sp_org_url = apr_hash_make(p);
@@ -1400,6 +1408,10 @@ void *auth_mellon_dir_merge(apr_pool_t *p, void *base, void *add)
add_cfg->idp_ignore :
base_cfg->idp_ignore;
+ new_cfg->sp_entity_id = (add_cfg->sp_entity_id ?
+ add_cfg->sp_entity_id :
+ base_cfg->sp_entity_id);
+
new_cfg->sp_org_name = apr_hash_copy(p,
(apr_hash_count(add_cfg->sp_org_name) > 0) ?
add_cfg->sp_org_name :