Skip to content

Improve CASv2 XML parsing when response is not standard - #4

Merged
evgenyfadeev merged 1 commit into
python-cas:masterfrom
Nereo:master
Feb 21, 2017
Merged

evgenyfadeev merged 1 commit into
python-cas:masterfrom
Nereo:master

Conversation

@frankie567

Copy link
Copy Markdown

Ok, so I was quietly configuring a CAS connection for one of our client when suddenly this XML response was returned to me:

<?xml version="1.0" encoding="UTF-8"?> <cas:serviceResponse xmlns:cas="http://www.yale.edu/tp/cas"><cas:authenticationSuccess><cas:utilisateur><cas:displayName>John Doe</cas:displayName><cas:user>someuser</cas:user><cas:uid>someuser</cas:uid></cas:utilisateur></cas:authenticationSuccess></cas:serviceResponse>

Our beloved client use a custom version of CAS which nests the cas:user node inside a nice cas:utilisateur node.

I don't know if it has its place in the main repository, but here is a pull request that cope with this case by looking for the cas:user node in the whole tree and not just in the children of cas:authenticationSuccess.

Best regards !

@evgenyfadeev
evgenyfadeev merged commit a78b0b3 into python-cas:master Feb 21, 2017
mingchen pushed a commit that referenced this pull request Aug 3, 2018
Improve CASv2 XML parsing when response is not standard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants