def handler(self,):
if self.oauth_version == '<STR_LIT>':<EOL><INDENT>request_token, request_token_secret = self.oauth.get_request_token(params={'<STR_LIT>': self.callback_uri})<EOL>logger.debug("<STR_LIT>".format(request_token, request_token_secret))<EOL>authorize_url = self.oauth.get_authorize_url(request_token)<EOL><DEDENT>else:<EOL><INDENT>authorize_url = self.oauth.get_authorize_url(client_secret=self.consumer_secret, redirect_uri=self.callback_uri, response_type='<STR_LIT:code>')<EOL><DEDENT>logger.debug("<STR_LIT>".format(authorize_url))<EOL>webbrowser.open(authorize_url)<EOL>self.verifier = input("<STR_LIT>")<EOL>self.token_time = time.time()<EOL>credentials = {'<STR_LIT>': self.token_time}<EOL>if self.oauth_version == '<STR_LIT>':<EOL><INDENT>raw_access = self.oauth.get_raw_access_token(request_token, request_token_secret, params={"<STR_LIT>": self.verifier})<EOL>parsed_access = parse_utf8_qsl(raw_access.content)<EOL>self.access_token = parsed_access['<STR_LIT>']<EOL>self.access_token_secret = parsed_access['<STR_LIT>']<EOL>self.session_handle = parsed_access['<STR_LIT>']<EOL>self.guid = parsed_access['<STR_LIT>']<EOL>credentials.update({<EOL>'<STR_LIT>': self.access_token,<EOL>'<STR_LIT>': self.access_token_secret,<EOL>'<STR_LIT>': self.session_handle,<EOL>'<STR_LIT>': self.guid<EOL>})<EOL><DEDENT>else:<EOL><INDENT>headers = self.generate_oauth2_headers()<EOL>raw_access = self.oauth.get_raw_access_token(data={"<STR_LIT:code>": self.verifier, '<STR_LIT>': self.callback_uri,'<STR_LIT>':'<STR_LIT>'}, headers=headers)<EOL>credentials.update(self.oauth2_access_parser(raw_access))<EOL><DEDENT>return credentials<EOL>
* get request token if OAuth1
            * Get user authorization
            * Get access token