Commit c9eb82a9 authored by Jonathan Schaeffer's avatar Jonathan Schaeffer
Browse files

Handle a missing givenName

parent fc477b86
......@@ -43,6 +43,8 @@ def parse_input_data(data):
d = dict([i for i in kv.split(':',1)] for kv in token.replace('"','').replace(' ','').split(','))
# Add the sha1 of the token to put in the credentials db
d['shortSha1'] = sha1(token.encode()).hexdigest()[0:8]
if 'giverName' not in d:
d['givenName'] = d.get('cn', 'unknown')
application.logger.debug("Transformed to dictionary : %s", d)
return d
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment