made cas_provider response py3 compatible

This commit is contained in:
Roald Osinga
2018-01-05 11:49:20 +01:00
parent 4f51647b2f
commit 9bf8ca9c3b
+3 -3
View File
@@ -2498,9 +2498,9 @@ class Auth(AuthAPI):
success = True
def build_response(body):
return '<?xml version="1.0" encoding="UTF-8"?>\n' +\
TAG['cas:serviceResponse'](
body, **{'_xmlns:cas': 'http://www.yale.edu/tp/cas'}).xml()
xml_body = to_native(TAG['cas:serviceResponse'](
body, **{'_xmlns:cas': 'http://www.yale.edu/tp/cas'}).xml())
return '<?xml version="1.0" encoding="UTF-8"?>\n' + xml_body
if success:
if version == 1:
message = 'yes\n%s' % user[userfield]