ios - How to get the token for streaming live video HLS -


i'm trying build personal ios app watch of favorite tv channels. that, analyze website providing live tv service. notice using hls protocol.

using firebug, can see chunklist link, use mpmovieplayercontroller or avplayerviewcontroller play live video. works perfectly.
now, notice each chunklist link contains parameter "token" @ end of it. example:

.../chunklist_b300000.m3u8?token=eyjoyxnox3zhbhvlijogijq4owuwmgizn2y4ztnlyzrlzti4zjg0n2i3njqxndeyiiwginnlcnzlcl90aw1lijogmtq1ndyynjcxmcwgimnoyw5uzwxfawqioiaidnrjnyisicj2ywxpzf9taw51dgvzijogmtq0mh0 

i can use link many times , still works. however, if i'm using same token on 2 devices @ same time, doesn't work well. , guess, after duration, several days, token expire.
therefore, i'd know how generate token. tried detect firebug couldn't find out answer. here website:
livetv
is there standard way generate token? , how fetch new token every time open app?

there no standard way of generating (secure) tokens.

most servers generate token combining ip, mac-addresss, client uuid of sort, , secret keyworld. result hashed using cryptographically strong algorithm sha-1 or sha-3 , base64 encoded ease of use.

even if knew combining scheme , hashing algorithm still wouldn't know secret keyword , couldn't generate tokens yourself.

some servers generate unique token doesn't carry info itself. rather server associates (using database of sort) internal information (like token validity, expiration date , on). in case token irrelevant state of server matters.

a way of generating new tokens make requests server spoofing normal/valid user browser , parse response token.

maybe question more appropriate crypto or security stack exchange because it's not related programming rather content protection.


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -