misc: allow unicode strings as authn classref (#10666)
This commit is contained in:
parent
9fe5a00a52
commit
6a6405d75f
|
@ -338,9 +338,10 @@ class LoginView(ProfileMixin, LogMixin, View):
|
|||
# configure requested AuthnClassRef
|
||||
authn_classref = utils.get_setting(idp, 'AUTHN_CLASSREF')
|
||||
if authn_classref:
|
||||
authn_classref = tuple([str(x) for x in authn_classref])
|
||||
req_authncontext = lasso.Samlp2RequestedAuthnContext()
|
||||
authn_request.requestedAuthnContext = req_authncontext
|
||||
req_authncontext.authnContextClassRef = tuple(authn_classref)
|
||||
req_authncontext.authnContextClassRef = authn_classref
|
||||
self.set_next_url(next_url)
|
||||
login.buildAuthnRequestMsg()
|
||||
except lasso.Error, e:
|
||||
|
|
|
@ -198,8 +198,8 @@ def test_sp_initiated_login_chosen(private_settings, client):
|
|||
def test_sp_initiated_login_requested_authn_context(private_settings, client):
|
||||
private_settings.MELLON_IDENTITY_PROVIDERS = [{
|
||||
'METADATA': open('tests/metadata.xml').read(),
|
||||
'AUTHN_CLASSREF': ['urn:be:fedict:iam:fas:citizen:eid',
|
||||
'urn:be:fedict:iam:fas:citizen:token'],
|
||||
'AUTHN_CLASSREF': [u'urn:be:fedict:iam:fas:citizen:eid',
|
||||
u'urn:be:fedict:iam:fas:citizen:token'],
|
||||
}]
|
||||
response = client.get('/login/')
|
||||
assert response.status_code == 302
|
||||
|
|
Loading…
Reference in New Issue