Open aleksanb opened 8 years ago
@aleksanb Interesting way to use the on_publish
for authentication. How do you block a connection or publisher? with this API?
We send a 'stream-key' as an extra parameter during rtmp connect. As the nginx-notify module appends all arguments from the original connection to the on_publish, etc methods, the authentication server can then check the received stream-key from the nginx-rtmp server, and deny (return a 4xx response code) if the stream-key doesn't match the one originally provided by our authentication server.
Nginx-rtmp will then drop the connection.
Nice, didn't know that was possible that way.
@luukverhoeven can't belive you :) You better read the Directives wiki page, because this module has a lot features like that and you can do very great things with http requests (notify and control sub-modules).
@aleksanb I think you should stay at your approach, because it's just bullet-proof and "production ready".
+1 for https in directives callbacks
Reading what @aleksanb is doing, I think it is an excellent approach in any case.
needing this as well, any progress??
We have a use-case where we have to authenticate rtmp-sessions against an API which is only available on https.
It seems that one currently cannot use https-urls in methods like on_publish, so we've worked around the problem by using nginx as an http->https proxy like this:
Is there any way to have this functionality integrated in nginx-rtmp?