From 1d2c882ba14c007d9cf966ac1c131fb3628bb810 Mon Sep 17 00:00:00 2001 From: "manu@netbsd.org" Date: Mon, 15 Apr 2013 14:54:38 +0000 Subject: Add MellonSPentityId to control entityId in autogenerated metadata git-svn-id: https://modmellon.googlecode.com/svn/trunk@205 a716ebb1-153a-0410-b759-cfb97c6a1b53 --- auth_mellon_config.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'auth_mellon_config.c') 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 : -- cgit