add option to select POST.
git-svn-id: svn://localhost/lasso-conform/trunk@15 2a3a78c3-912c-0410-af21-e1fb2d1df599
This commit is contained in:
parent
36ad97341d
commit
3c3c7eb30e
|
@ -101,6 +101,9 @@ class RootDirectory(Directory):
|
|||
def unlogged_page [html] (self):
|
||||
form = Form(enctype='multipart/form-data')
|
||||
form.add(HtmlWidget, '<div id="sso-options">')
|
||||
form.add(SingleSelectWidget, 'binding',
|
||||
title = _('Protocol Binding for <Response>'),
|
||||
options = [(None, ''), ('post', 'POST'), ('artifact', 'Artifact')])
|
||||
form.add(CheckboxWidget, 'force_authn', value = False,
|
||||
title = _('Force Authentication (ForceAuthn)'))
|
||||
form.add(CheckboxWidget, 'is_passive',
|
||||
|
@ -188,6 +191,12 @@ class RootDirectory(Directory):
|
|||
elif nid_format == 'none':
|
||||
login.request.nameIDPolicy.format = lasso.SAML2_NAME_IDENTIFIER_FORMAT_NONE
|
||||
|
||||
binding = form.get_widget('binding').parse()
|
||||
if binding == 'artifact':
|
||||
login.request.protocolBinding = lasso.SAML2_METADATA_BINDING_ARTIFACT
|
||||
elif binding == 'post':
|
||||
login.request.protocolBinding = lasso.SAML2_METADATA_BINDING_POST
|
||||
|
||||
login.request.nameIDPolicy.allowCreate = form.get_widget('allow_create').parse()
|
||||
login.request.forceAuthn = form.get_widget('force_authn').parse()
|
||||
login.request.isPassive = form.get_widget('is_passive').parse()
|
||||
|
|
Reference in New Issue