def _get_owner_user_id_token(self): """A way to get the user token id of owner profile""" # In order to get a user id token of another (non-owner) profile you must make a request with SWITCH_PROFILE # authentication scheme (a custom authentication for netflix), and this request can be directly included # in the MSL manifest request. # But in order to execute this switch profile, you need to have the user id token of the main (owner) profile. # The only way (found to now) to get it immediately, is send a logblob event request, and save the # user id token obtained in the response. LOG.debug('Requesting logblog') endpoint_url = ENDPOINTS['logblobs'] + create_req_params(0, 'bind') response = self.chunked_request(endpoint_url, self.build_request_data( '/logblob', generate_logblobs_params()), get_esn(), force_auth_credential=True) LOG.debug('Response of logblob request: {}', response)
def _get_owner_user_id_token(self): """A way to get the user token id of owner profile""" # In order to get a user id token of another (non-owner) profile you must make a request with SWITCH_PROFILE # authentication scheme (a custom authentication for netflix), and this request can be directly included # in the MSL manifest request. # But in order to execute this switch profile, you need to have the user id token of the main (owner) profile. # The only way (found to now) to get it immediately, is send a logblob event request, and save the # user id token obtained in the response. common.debug('Requesting logblog') params = {'reqAttempt': 1, 'reqPriority': 0, 'reqName': EVENT_BIND} url = ENDPOINTS['logblobs'] + '?' + urlencode(params).replace('%2F', '/') response = self.chunked_request(url, self.build_request_data('/logblob', generate_logblobs_params()), g.get_esn(), force_auth_credential=True) common.debug('Response of logblob request: {}', response)