jgh- / VideoCore-Inactive

*No longer in development* Please see https://github.com/unpause-live/SwiftVideo
MIT License
1.48k stars 538 forks source link

Authentication in RTMP #201

Open dinesh547 opened 9 years ago

dinesh547 commented 9 years ago

Seems like there is no authentication support has been implemented in current code.

jgh- commented 9 years ago

There is not, but if somebody wants to implement it that would be a great PR.

dinesh547 commented 9 years ago

@jgh- , I am trying to implement the same but there are no much documentation available for RTMP. Do you know any document which details the authentication in RTMP and RTMP as whole as well..

shubhank008 commented 9 years ago

Pretty sure you can just use rtmp://user:password@host
It works for FFMpeg atleast

dinesh547 commented 9 years ago

@shubhank008 as per i know it works only for ffmpeg (or applications using ffmpeg) not for videocore.

jgh- commented 9 years ago

Not really, when I was developing the RTMP stuff originally I was mainly going by the "spec" that Adobe released a few years back.

dinesh547 commented 9 years ago

Hi @jgh- i am trying to implement the authentication in your code. But i am facing some issues while sending the data.. What i am doing is checking if I am getting an authentication failure message in the
void RTMPSession::handleInvoke(uint8_t* p) inside RTMPSession.cpp class. The Authentication failure message comes as in the handleInvoke function so i checked if (command == "_error") and than i am checking inside the if statement std::string code = parseStatusCode(p + 3 + command.length()); if(code == "NetConnection.Connect.Rejected") { //Authentication failure sendCallAuthenticationRequest() }

Now when I send the second connect request from inside this function i never receives any response. and i am not sure why it is happening.. (Code is not in pure objective c and i am not very good in c++ OOPS). Can you help me in this.. Right now i am doing authentication for adobe (authmod=adobe)..

keithcml commented 8 years ago

@dinesh547 can you give more details to me, I can help to make the authentication feature. I am now have no idea about it.

triwav commented 8 years ago

Not sure if it's bad form but just want throw out there that I moved away from this project due to the lack of authentication. However I just had a ticket closed on another library that now correctly handles authentication Akamai which we use https://github.com/shogo4405/lf.swift/issues/55. If you need authentication might look into it.

dinesh547 commented 8 years ago

ANybody who needs to implement authentication can refer to ffmpeg code. The authentication code is pretty much clear there.