Wowza Community

Authentication while watching video


Is there a way where when someone tries to watch a video(live/vod), they can be made to enter username/password to watch it?

Can someone tell me if its possible or not and guide me to appropriate tutorial or something.


Hi there,

Please take a look at this example:

How to do file-based authentication with RTMP client and credentials in querystring of the RTMP URL (ModuleOnConnectAuthenticate2)

There is nothing built in that provides this functionality for HLS streams.

You would need to develop a custom module. A good starting place would be:

How to limit playback by IP address (ModuleOverridePlayRestrictIP)

Alternatively, this guide provides other methods for encrypting HLS streams:

How to secure Apple HLS streaming using DRM encryption



I suggest removing the properties and testing the module with the defaults. So just enabling the module should work.

This will mean you need to create a “connect.password” file in your /conf folder.

Also, this module is not compatible with the Wowza Streaming Engine Incoming Security > RTMP Publishing > Require Password Authentication setting. If you use this module, the RTMP Publishing setting must be set to Open.


So I ran a few test with this module and it is working. Both for live and VOD.

Can you describe the process for setting this module up and for connection the encoder and playback?


In JW Player, put it in the HTML container where the rtmp url is set. Add the querystring after the application part, not after the stream name. For example in JW Player 6 you would set the file: to:

<title>JW Player 6</title>
<script type="text/javascript" src="/jwplayer/jwplayer.js" ></script>
<div id="player">Loading the player...</div>
<script type="text/javascript">
   	sources: [{
            file: "rtmp://[wowza-address]:1935/live?user&pass1/"
            file: "http://[wowza-address]:1935/live?user&pass1/"



I tried the file-based authentication but its not working.

I configured the Modules and Properties.

But I am able to connect to the server without authentication and watch it as well.

Am I missing anything?

Still doesn’t work.

I can still connect and view the stream without authentication.

  1. I created a new app - auth

  2. I disable the incoming security. RTMP Publishing is Open.

  3. Added the module as given in the tutorial : moduleOnConnectAuthenticate

  4. Restarted the app.

  5. created a connect.password file in /conf. added a user1 pass1 in the file.

  6. restarted the server.

  7. On FME, i tried connecting to the /auth app without any authentication. It didn’t connect. It connected when I passed the authentication in querystring. So this is fine.

  8. I am trying to watch the stream using JWPlayer. I use /auth/streamname as the path. but it doesn’t work.

What do I have to do to make it work?

But then anyone can see the username-password and start streaming on to my server. Isn’t it?

I was looking for a solution where there is a login box pop-up when the video is requested and can be viewed after putting in correct details.

And these login credentials were different from what I will be using to push the stream.