Commit 934b29e2 authored by Vincent Ardisson's avatar Vincent Ardisson Committed by Romain Bignon

OAuth2Mixin: log current auth step

parent bd3a9e91
......@@ -1009,6 +1009,7 @@ class OAuth2Mixin(StatesMixin):
return p._replace(query=urlencode(q)).geturl()
def request_authorization(self):
self.logger.info('request authorization')
raise BrowserRedirect(self.build_authorization_uri())
def build_access_token_parameters(self, values):
......@@ -1023,6 +1024,8 @@ class OAuth2Mixin(StatesMixin):
return self.open(self.ACCESS_TOKEN_URI, data=data)
def request_access_token(self, auth_uri):
self.logger.info('requesting access token')
if isinstance(auth_uri, dict):
values = auth_uri
else:
......@@ -1036,6 +1039,8 @@ class OAuth2Mixin(StatesMixin):
self.update_token(auth_response)
def use_refresh_token(self):
self.logger.info('refreshing token')
data = {'grant_type': 'refresh_token',
'refresh_token': self.refresh_token,
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment