Skip to content

Commit

Permalink
Merge pull request #153 from eduNEXT/MJG/extra_data_oidc
Browse files Browse the repository at this point in the history
feat: add override extra_data method to OIDC
  • Loading branch information
mariajgrimaldi authored Jun 24, 2021
2 parents c4d5573 + c758c16 commit 076c416
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions eox_core/social_tpa_backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,13 @@ def oidc_config(self):
self.OIDC_ENDPOINT + '/.well-known/openid-configuration'
)
return self.configuration

def extra_data(self, user, uid, response, details=None, *args, **kwargs): # pylint: disable=keyword-arg-before-vararg
"""
Override method extra_data returned by the provider including user
information.
"""
data = super().extra_data(user, uid, response, details, *args, **kwargs)
data["user_details"] = self.get_user_details(response)

return data

0 comments on commit 076c416

Please sign in to comment.