Skip to content

Commit

Permalink
add dump userinfo data in ODExternalAuthProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandredevely committed Oct 17, 2023
1 parent fd47c98 commit 45d748f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion oc/auth/authservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -2036,7 +2036,7 @@ def authenticate(self, code=None, **params):
oauthsession = OAuth2Session( self.client_id, scope=self.scope, redirect_uri=self.redirect_uri)
authorization_response = self.redirect_uri_prefix + '?' + cherrypy.request.query_string
token = oauthsession.fetch_token( self.token_url, client_secret=self.client_secret, authorization_response=authorization_response )
self.logger.debug( 'provider %s type %s return token %s', self.name, self.type, str(token) )
self.logger.debug( f"provider {self.name} type {self.type} return token {token}" )
authinfo = AuthInfo( provider=self.name, providertype=self.type, token=oauthsession, protocol='oauth')
return authinfo

Expand All @@ -2056,6 +2056,7 @@ def getuserinfo(self, authinfo, **params):
if isinstance(response_userinfo, requests.models.Response) and response_userinfo.ok is True :
jsondata = response_userinfo.content.decode(response_userinfo.encoding or self.encoding )
data = json.loads(jsondata)
self.logger.debug( f"dump userinfo data={data}" )
userinfo = self.parseuserinfo( data )
return userinfo

Expand Down

0 comments on commit 45d748f

Please sign in to comment.