# onConnectAccept() method doesn't work with RTSP

**URL:** https://community.wowza.com/t/onconnectaccept-method-doesnt-work-with-rtsp/46887
**Category:** Wowza Streaming Engine
**Created:** [April 24, 2016, 6:49pm UTC](https://community.wowza.com/t/onconnectaccept-method-doesnt-work-with-rtsp/46887 "2016-04-24T18:49:36Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Dracula\_Akumajou](https://avatars.discourse-cdn.com/v4/letter/d/bc8723/32.png) [@Dracula\_Akumajou](https://community.wowza.com/u/Dracula_Akumajou)
#### Post date: [April 24, 2016, 6:49pm UTC](https://community.wowza.com/t/onconnectaccept-method-doesnt-work-with-rtsp/46887/1 "2016-04-24T18:49:36Z")

</div>

Hello,

I am working with java IDE, trying to add a stream listener only to the Authenticated users. However, onConnectAccept(IClient client) only works with RTMP.

Also, stream.getUniqueStreamIdStr(); doesn’t give a unique id on rtsp encoder from mobile app nor it gives a unique id with client.getClientId().

I want to work with onPublish() method without adding listeners to each and every stream (player/publisher).

Regards,

---

<div class="post-metadata">

### Author: ![Dracula\_Akumajou](https://avatars.discourse-cdn.com/v4/letter/d/bc8723/32.png) [@Dracula\_Akumajou](https://community.wowza.com/u/Dracula_Akumajou)
#### Post date: [April 24, 2016, 11:29pm UTC](https://community.wowza.com/t/onconnectaccept-method-doesnt-work-with-rtsp/46887/2 "2016-04-24T23:29:59Z")

</div>

I found this topic, it helped a little although I don’t wish to replace the **password file** authentication. I just want to know whether the user is authenticated or not.

It’s outdated topic. And the file **[install-dir]/conf/Authentication.xml** is missing!, I had to extract it from **wms-server.jar** in **com/wowza/wms/conf/Authentication.xml**.

And the closing Name tag after passwordFile is not closed in the example xml .

[How to integrate Wowza user authentication with external authentication systems (ModuleRTMPAuthenticate)](https://www.wowza.com/docs/how-to-integrate-wowza-user-authentication-with-external-authentication-systems-modulertmpauthenticate%28ModuleRTMPAuthenticate%29)

Regards,

---

<div class="post-metadata">

### Author: ![Michelle\_B](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/michelle_b/32/394_2.png) [@Michelle\_B](https://community.wowza.com/u/Michelle_B)
#### Post date: [May 11, 2016, 8:09pm UTC](https://community.wowza.com/t/onconnectaccept-method-doesnt-work-with-rtsp/46887/3 "2016-05-11T20:09:37Z")

</div>

Hi,

If you need to intercept RTP authentication, you will need to override Authentication.xml and the security modules defined for the built-in product. In previous versions of Wowza, this file was available to be edited. However, in version 4, this configuration file has been built-in to the package and would need to be extracted (as you have found) so that you can override the default values.

Can you provide additional information on what you are trying to do with your custom module? The onPublish() method should only be called for a publisher, and not a player connection.

Michelle
