harlanc/xiu

Add authentication

svenstaro opened this issue · 7 comments

OBS supports sending a bearer token. I think it'd be nice if that were supported by xiu for some basic authentication.

What authentication methods do you usually use?

I think OBS uses Bearer? To be honest, I'm not super sure which authentication they support but I think it might make sense to support the same scheme.

Whip supports Bearer: HTTP header authorization. However, it would be nice if xiu supports both Bearer and auth based on a parameter such as whip?app=live&stream=test&key=whateverencryptedpasswordhere

To implement the feature, some refactor work needs to be done: most of the http mod codes in RTSP and WebRTC library are duplicate, which can be extracted as a common library and then the authentication logics can be added in this library.

Reference : https://pengrl.com/lal/#/auth for the auth algorithms.

Thanks!