Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix get_nameid_unspecified and friends (refs #52) #55

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions djangosaml2idp/processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,19 @@ def get_nameid_persistent(cls, user_id, sp_entityid='', idp_entityid='', user=No
return '!'.join([idp_entityid, sp_entityid, cls._get_nameid_opaque(user_id, salt=str(user.pk).encode())])

@classmethod
def get_nameid_email(cls, user_id):
def get_nameid_email(cls, user_id, **kwargs):
if '@' not in user_id:
raise Exception("user_id {} does not contain the '@' symbol, so is not a valid NameID Email address format.".format(user_id))
return user_id

@classmethod
def get_nameid_transient(cls, user_id):
def get_nameid_transient(cls, user_id, **kwargs):
""" This would return EPPN
"""
return user_id

@classmethod
def get_nameid_unspecified(cls, user_id):
def get_nameid_unspecified(cls, user_id, **kwargs):
""" returns user_id as is
"""
return user_id
Expand Down