# Distinguish between playback and pushing - auth

**URL:** <https://community.wowza.com/t/distinguish-between-playback-and-pushing-auth/47586>\
**Category:** Wowza Developer Dojo\
**Tags:** wowza-streaming-server-java-api\
**Created:** [October 19, 2016, 1:18am UTC](https://community.wowza.com/t/distinguish-between-playback-and-pushing-auth/47586 "2016-10-19T01:18:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anna\_Hansen](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@Anna\_Hansen](https://community.wowza.com/u/Anna_Hansen)\
**Post date:** [October 19, 2016, 1:18am UTC](https://community.wowza.com/t/distinguish-between-playback-and-pushing-auth/47586/1 "2016-10-19T01:18:11Z")

</div>

Hi,

I’m trying to build a module to distinguish between the playback and pushing of stream to be able to implant a custom authentication where the login information is provided

via the url parameters ex. rtmp://domain.com/app/stream?user=Anna&pass=1234, but i want to do that only to the “pushing of stream” so the playback don’t need auth. Can

somone please tell me how to do that? and maybe show me if possible. I tried to do that in ModuleBase Class inside that onConnect method, but that required auth on playback

and publish…

---

<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:** [December 22, 2016, 3:59pm UTC](https://community.wowza.com/t/distinguish-between-playback-and-pushing-auth/47586/2 "2016-12-22T15:59:04Z")

</div>

Hi,

You should be able to implement the [IMediaStreamActionNotify3](https://www.wowza.com/docs/how-to-use-imediastreamactionnotify3-interface-to-listen-for-rtmp-stream-events-includes-codec-info%28includes-codec-info%29) interface and add your code to the onPlay and onPublish events.

Michelle
