summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2014-04-11 16:46:24 -0400
committerSimo Sorce <simo@redhat.com>2014-04-11 17:25:54 -0400
commit2bed65a8810b7f81ec2be93275fa06f4da52e56f (patch)
tree26e25360dc6a5f69282c218ed5c552e86974b4fc
parent11242b8a3cab8d1594644cf22285e94639cca158 (diff)
downloadipsilon-2bed65a8810b7f81ec2be93275fa06f4da52e56f.tar.gz
ipsilon-2bed65a8810b7f81ec2be93275fa06f4da52e56f.tar.xz
ipsilon-2bed65a8810b7f81ec2be93275fa06f4da52e56f.zip
Allow to set additional custom keys on services
Signed-off-by: Simo Sorce <simo@redhat.com>
-rwxr-xr-xipsilon/tools/saml2metadata.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/ipsilon/tools/saml2metadata.py b/ipsilon/tools/saml2metadata.py
index b86e727..27eddb9 100755
--- a/ipsilon/tools/saml2metadata.py
+++ b/ipsilon/tools/saml2metadata.py
@@ -107,10 +107,12 @@ class Metadata(object):
if enccert:
self.add_cert(enccert.get_cert(), 'encryption')
- def add_service(self, service, location):
+ def add_service(self, service, location, **kwargs):
svc = mdElement(self.role, service[0])
svc.set('Binding', service[1])
svc.set('Location', location)
+ for key, value in kwargs.iteritems():
+ svc.set(key, value)
def add_allowed_name_format(self, name_format):
nameidfmt = mdElement(self.role, 'NameIDFormat')