Added the possibility to force NameID encryption with NameID format : encrypted

git-svn-id: svn://localhost/lasso-conform/trunk@28 2a3a78c3-912c-0410-af21-e1fb2d1df599
This commit is contained in:
dlaniel 2006-12-01 10:09:37 +00:00
parent 1f0fedddcf
commit 85aa8bc522
1 changed files with 4 additions and 1 deletions

View File

@ -116,7 +116,8 @@ class RootDirectory(Directory):
title = _('Name Identifier Format'),
options = [('persistent', _('Persistent')),
('transient', _('Transient')),
('none', _('(none'))])
('encrypted', _('Encrypted')),
('none', _('(none)'))])
# XXX: affiliation
form.add(SingleSelectWidget, 'consent',
title = _('Consent'),
@ -236,6 +237,8 @@ class RootDirectory(Directory):
login.request.nameIDPolicy.format = lasso.SAML2_NAME_IDENTIFIER_FORMAT_PERSISTENT
elif nid_format == 'transient':
login.request.nameIDPolicy.format = lasso.SAML2_NAME_IDENTIFIER_FORMAT_TRANSIENT
elif nid_format == 'encrypted':
login.request.nameIDPolicy.format = lasso.SAML2_NAME_IDENTIFIER_FORMAT_ENCRYPTED
elif nid_format == 'none':
login.request.nameIDPolicy.format = lasso.SAML2_NAME_IDENTIFIER_FORMAT_NONE