Skip to content

Commit

Permalink
feat: add override extra_data method to OIDC
Browse files Browse the repository at this point in the history
  • Loading branch information
mariajgrimaldi committed Jun 24, 2021
1 parent c4d5573 commit c758c16
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 c758c16

Please sign in to comment.