Skip to content

Commit

Permalink
Bugfix get_nameid_unspecified and friends (refs #52) (#55)
Browse files Browse the repository at this point in the history
Bugfix get_nameid_unspecified and friends (refs #52)
  • Loading branch information
mjholtkamp authored Feb 3, 2020
1 parent 18f16fa commit bd5d6a6
Showing 1 changed file with 3 additions and 3 deletions.
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

0 comments on commit bd5d6a6

Please sign in to comment.