def on_callback(self,auth_resp):
        """ Must be called once the authorisation server has responded after
            redirecting to the url provided by 'get_authorisation_url' and completing
            the login there.
            Returns True if a token was successfully retrieved, False otherwise."""
        try:
            oauth = OAuth2Session(self.client_id,state=self.state,redirect_uri=self.redirect_url)
            self.token = oauth.fetch_token(self.token_url,
                                           authorization_response=auth_resp,
                                           client_secret=self.client_secret,
                                           verify=self.verifySSL)
            if not self.api_key and self.API_KEY_DEFAULT:
                self.get_api_key()
                if not self.api_key:
                    self.API_KEY_DEFAULT = False
        except Exception:
            #print("Unexpected error:", sys.exc_info()[0])
            #print("Could not fetch token from OAuth Callback!")
            return False
        return True
def on_callback ( self , auth_resp ) : try : oauth = OAuth2Session ( self . client_id , state = self . state , redirect_uri = self . redirect_url ) self . token = oauth . fetch_token ( self . token_url , authorization_response = auth_resp , client_secret = self . client_secret , verify = self . verifySSL ) if not self . api_key and self . API_KEY_DEFAULT : self . get_api_key ( ) if not self . api_key : self . API_KEY_DEFAULT = False except Exception : return False return True
Must be called once the authorisation server has responded after
            redirecting to the url provided by 'get_authorisation_url' and completing
            the login there.
            Returns True if a token was successfully retrieved, False otherwise.