The way we handle authentication is through Stream Aliasing. Stream aliasing allows you to control all of the authentication details while still providing atomic stream access control. There is no need to sync authentication details with the EMS which keeps your implementation simple. The work flow could look similar to this:
1) A user logs in to your website or app.
2) You validate the login against your DB/config/etc
3) The user selects a camera/feed to start streaming by clicking on it
4) Your server side then issues an HTTP post to the EMS to create a stream alias
5) Your server side gives the new aliased stream link to the player
6) The player loads on the browser/app and plays for the user
7) Once playback begins, the alias is deleted, invalidating that link
Stream aliasing is used in a variety of different industries, including security and surveillance systems, providing an extremely secure and robust protection mechanism.
With the release of version 1.6.6 stream aliasing can even be used with HTTP based protocols such as HLS, DASH, Smooth Streaming and HDS.