disable unimplemented field and select correct idp
git-svn-id: svn://localhost/lasso-conform/trunk@16 2a3a78c3-912c-0410-af21-e1fb2d1df599
This commit is contained in:
parent
3c3c7eb30e
commit
aef8cfb137
16
lcs/root.ptl
16
lcs/root.ptl
|
@ -118,15 +118,17 @@ class RootDirectory(Directory):
|
|||
# XXX: affiliation
|
||||
form.add(SingleSelectWidget, 'consent',
|
||||
title = _('Consent'),
|
||||
options = ['(empty)', 'obtained', 'prior', 'current-implicit',
|
||||
options = ['', 'obtained', 'prior', 'current-implicit',
|
||||
'current-explicit', 'unavailable', 'inapplicable'])
|
||||
form.add(SingleSelectWidget, 'authn_context',
|
||||
title = _('Authn Req Context'),
|
||||
options = ['(empty)', 'password', 'password on protected transport',
|
||||
'Client Certificate'])
|
||||
'Client Certificate'],
|
||||
disabled = 'disabled')
|
||||
form.add(SingleSelectWidget, 'matching',
|
||||
title = _('Matching Rule'),
|
||||
options = ['(empty)', 'exact', 'minimum', 'maximum', 'better'])
|
||||
options = ['(empty)', 'exact', 'minimum', 'maximum', 'better'],
|
||||
disabled = 'disabled')
|
||||
form.add(HtmlWidget, '</div>')
|
||||
|
||||
for kidp, idp in get_cfg('idp', {}).items():
|
||||
|
@ -178,8 +180,10 @@ class RootDirectory(Directory):
|
|||
server = misc.get_lasso_server(protocol = 'saml2')
|
||||
login = lasso.Login(server)
|
||||
|
||||
idp = None
|
||||
# XXX: get idp from submitted button
|
||||
idp = form.get_submit()
|
||||
if idp:
|
||||
p = misc.get_provider(idp)
|
||||
idp = p.providerId
|
||||
|
||||
login.initAuthnRequest(idp, lasso.HTTP_METHOD_REDIRECT) # XXX: method must be an option
|
||||
|
||||
|
@ -205,6 +209,8 @@ class RootDirectory(Directory):
|
|||
if consent:
|
||||
login.request.consent = 'urn:oasis:names:tc:SAML:2.0:consent:%s' % consent
|
||||
|
||||
# XXX: authn_context
|
||||
|
||||
login.buildAuthnRequestMsg()
|
||||
return redirect(login.msgUrl)
|
||||
|
||||
|
|
Reference in New Issue