def handle_oauth1_response(self, args):
client = self.make_client()<EOL>client.verifier = args.get('<STR_LIT>')<EOL>tup = session.get('<STR_LIT>' % self.name)<EOL>if not tup:<EOL><INDENT>raise OAuthException(<EOL>'<STR_LIT>',<EOL>type='<STR_LIT>'<EOL>)<EOL><DEDENT>client.resource_owner_key = tup[<NUM_LIT:0>]<EOL>client.resource_owner_secret = tup[<NUM_LIT:1>]<EOL>uri, headers, data = client.sign(<EOL>self.expand_url(self.access_token_url),<EOL>_encode(self.access_token_method)<EOL>)<EOL>headers.update(self._access_token_headers)<EOL>resp, content = self.http_request(<EOL>uri, headers, to_bytes(data, self.encoding),<EOL>method=self.access_token_method<EOL>)<EOL>data = parse_response(resp, content)<EOL>if resp.code not in (<NUM_LIT:200>, <NUM_LIT>):<EOL><INDENT>raise OAuthException(<EOL>'<STR_LIT>' % self.name,<EOL>type='<STR_LIT>', data=data<EOL>)<EOL><DEDENT>return data<EOL>
Handles an oauth1 authorization response.