Wowza Community


I’m trying to put together a module that authenticates users against our database instead of the the publish.password file.

I’m using Adobe Flash Media Encoder to do streaming.

It looks like I need to implement ModuleRTMPAuthenticate.onConnect, but onConnect doesn’t seem to like people playing with it.

FME connects, but when I try to Publish, I always get:

Status: NetStream.Publish.Failed

No other info is provided, even in the logs.

Also, I’ve tried it with and without the rtmpEncoderAuthenticatorFile property in Application.xml. It doesnt seem to make a difference.

Here’s some test code I was running:

public class testAuthentication extends ModuleRTMPAuthenticate{
    public void onConnect(IClient client, RequestFunction function,AMFDataList params) {

On a side note, I can accomplish what I want to do using the publish() method from ModuleBase, but it doesn’t fail as gracefully…there’s no pop-up box that appears for user/pass (has to be passed in then URL), and it FME hangs for a couple seconds when it receives client.rejectConnection() from publish().

So I’d really like it to behave like a “regular” FME session…password pop-up on connect, etc.

Any insight would be greatly appreciated.



See this forum post. It talks about a way to plug into authentication directly:


Look at the javadocs for the base class you are extending. Based on the type of connection you should be getting appropriate context information.


I’m streaming from Adobe FME with RTMP. But this class just doesn’t seem to get executed. It never shows the logging.

The post on authentication seems to eventually implement some classes with RTP and RTSP. Would these apply using RTMP?

Here’s the test code from that thread:

import com.wowza.wms.rtp.model.*;
import com.wowza.wms.application.*;
import com.wowza.wms.module.*;
import com.wowza.wms.logging.WMSLogger.*;
public class ModuleAccessControlRTSP extends ModuleBase
	public void onRTPSessionCreate(RTPSession rtpSession)
		boolean isGood = true;
		String ipAddress = rtpSession.getIp();
		String queryStr = rtpSession.getQueryStr();
		String referrer = rtpSession.getReferrer();
		String userAgent = rtpSession.getUserAgent();
		IApplicationInstance appInstance = rtpSession.getAppInstance();
		String uriStr = rtpSession.getUri();
		// Here you can use the request and session information above to determine 
		// if you want to reject the connection
		// isGood = true/false;
		if (!isGood)

These are in my Application.xml


I’ve tried switching the order of the modules, basic & digest authentication and looked around for RTMP specific functions. Any idea what I may be doing wrong?

Thanks for you help!


Is there a similar event that I could tap into for RTMP streaming?

Thanks for your help. I’ve got the authentication working now. But I was hoping I could get a reference to the the client within the getPassword() method. Something like:





It is this post I am talking about:

This will work with RTSP and RTMP. You need to turn on RTMP authentication as described in this package:

Then if you implement a class as described here and set the property in the application properties then it will call your class to do the authentication.


This event is not related to RTMP streaming. This would run when you start re-streaming from an IP camera that has an rtsp url, for example.


Yes, sorry: onStreamCreate, and onStreamDestroy. And the related IMediaStreamActionNotify2 interface and stream event handlers. See this post: