Skip to content

Commit

Permalink
Add missing kwargs for test, fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien LE MÉNER committed Mar 28, 2023
1 parent a4ef531 commit a585f66
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions oauthenticator/oauth2.py
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,7 @@ async def authenticate(self, handler, data=None, **kwargs):
# build the parameters to be used in the request exchanging the oauth code for the access token
access_token_params = self.build_access_tokens_request_params(handler, data)
# call the oauth endpoints
return await self._oauth_call(handler, access_token_params)
return await self._oauth_call(handler, access_token_params, **kwargs)

async def refresh_user(self, user, handler=None, **kwargs):
'''
Expand Down Expand Up @@ -815,9 +815,9 @@ async def refresh_user(self, user, handler=None, **kwargs):
refresh_token_params = self.build_refresh_token_request_params(
auth_state['refresh_token']
)
return await self._oauth_call(handler, refresh_token_params)
return await self._oauth_call(handler, refresh_token_params, **kwargs)

async def _oauth_call(self, handler, params, data=None):
async def _oauth_call(self, handler, params, data=None, **kwargs):
"""
Common logic shared by authenticate() and refresh_user()
"""
Expand Down

0 comments on commit a585f66

Please sign in to comment.