def authorize(self, token):
        oa_req = OAuthRequest.from_consumer_and_token(
            self.consumer,
            token=token,
            parameters={'application_name': self.application_name} if self.application_name else None,
            http_url=self.access_token_url
        )

        oa_req.sign_request(
            self.signature_method,
            self.consumer,
            token
        )
        req = self.http.get_url(oa_req.to_url())
        if not str(req.status).startswith('2'):
                self.analyze_error(req)
        res = req.data
        logging.debug(res)
        id = cgi.parse_qs(res)['user_id'][0]

        return id, OAuthToken.from_string(res)
Authorize a user with netflix and return a user id and an
dataset/ETHPy150Open ryszard/python-netflix/netflix/__init__.py/Netflix.authorize