Merge pull request #35 from maruiz93/master
Issue #31. Solved bug when no attributes.
This commit is contained in:
commit
5a79b56e0f
1 changed files with 1 additions and 1 deletions
|
@ -122,7 +122,7 @@ def validate(ticket):
|
|||
current_app.logger.debug("valid")
|
||||
xml_from_dict = xml_from_dict["cas:serviceResponse"]["cas:authenticationSuccess"]
|
||||
username = xml_from_dict["cas:user"]
|
||||
attributes = xml_from_dict["cas:attributes"]
|
||||
attributes = xml_from_dict.get("cas:attributes", {})
|
||||
|
||||
if "cas:memberOf" in attributes:
|
||||
attributes["cas:memberOf"] = attributes["cas:memberOf"].lstrip('[').rstrip(']').split(',')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue