# Authenticate both FMLE and Flash application

**URL:** <https://community.wowza.com/t/authenticate-both-fmle-and-flash-application/41599>\
**Category:** Wowza Developer Dojo\
**Tags:** wowza-streaming-server-java-api\
**Created:** [November 18, 2013, 1:48am UTC](https://community.wowza.com/t/authenticate-both-fmle-and-flash-application/41599 "2013-11-18T01:48:18Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Howard\_Wu](https://avatars.discourse-cdn.com/v4/letter/h/49beb7/32.png) [@Howard\_Wu](https://community.wowza.com/u/Howard_Wu)\
**Post date:** [November 18, 2013, 1:48am UTC](https://community.wowza.com/t/authenticate-both-fmle-and-flash-application/41599/1 "2013-11-18T01:48:18Z")

</div>

I’m trying to config my wowza server to require authentication for both FMLE and Flash applicaiton.

So I built 2 modules, the first extended AuthenticateUsernamePasswordProviderBase thus I can do database level control.

The second module extended ModuleBase , which checks referrer in onConnect to see if my Flash application is embedded at some particular web pages (thus denied all other referrer).

However, if I configured ModuleRTMPAuthenticate+my modules, then FMLE works fine but Web-Flash failed to create stream event though I did “client.acceptConnection()” or “this.invokePrevious()” at both onConnect and publish.

On the contrast, if I use moduleOnConnectAuthenticate(or moduleOnConnectAuthenticate2) instead of ModuleRTMPAuthenticate, and add username/password to my Flash application then it worked fine, but FMLE won’t work.

It seems that I have to use 2 different Wowza apps, one for FMLE and another for Flash application, is it?

Is there any way to auth both FMLE and Flash application in a single Wowza app?

Thanks for any information.

---

<div class="post-metadata">

**Author:** ![Roger\_Littin1](https://avatars.discourse-cdn.com/v4/letter/r/c89c15/32.png) [@Roger\_Littin1](https://community.wowza.com/u/Roger_Littin1)\
**Post date:** [November 19, 2013, 10:36am UTC](https://community.wowza.com/t/authenticate-both-fmle-and-flash-application/41599/2 "2013-11-19T10:36:59Z")

</div>

Hi,

If you use ModuleOnConnectAuthenticate2, then it should work with FMLE. This module accepts the username and password as query parameters which you can add to your fmle server url.

If you are using an old version of fmle, then query params may not work, in which case, you would add them as extra folders in the path.

```auto
rtmp://<wowza-ip>/live/_definst_/<username>/<password>

```

In Wowza, any folders after the appInstance portion of the rtmp url will automatically be converted to query params. Note: This is only for where the server address and stream name are entered separately.

Roger.

---

<div class="post-metadata">

**Author:** ![Carlo\_Lisci](https://avatars.discourse-cdn.com/v4/letter/c/13edae/32.png) [@Carlo\_Lisci](https://community.wowza.com/u/Carlo_Lisci)\
**Post date:** [January 17, 2014, 11:24am UTC](https://community.wowza.com/t/authenticate-both-fmle-and-flash-application/41599/3 "2014-01-17T11:24:00Z")

</div>

I have the same problem, I will want ModuleRTMPAuthenticate check only the connection with FMLE, while all the others I have my custom class that use querystring.

Is it possible in the same application use FMLE and NO FMLE authorization?

---

<div class="post-metadata">

**Author:** ![Carlo\_Lisci](https://avatars.discourse-cdn.com/v4/letter/c/13edae/32.png) [@Carlo\_Lisci](https://community.wowza.com/u/Carlo_Lisci)\
**Post date:** [January 20, 2014, 10:00am UTC](https://community.wowza.com/t/authenticate-both-fmle-and-flash-application/41599/4 "2014-01-20T10:00:23Z")

</div>

Thanks Roger, It works fine.

Carlo

---

<div class="post-metadata">

**Author:** ![Roger\_Littin1](https://avatars.discourse-cdn.com/v4/letter/r/c89c15/32.png) [@Roger\_Littin1](https://community.wowza.com/u/Roger_Littin1)\
**Post date:** [January 20, 2014, 7:58am UTC](https://community.wowza.com/t/authenticate-both-fmle-and-flash-application/41599/5 "2014-01-20T07:58:01Z")

</div>

Hi It could be possible if your custom class extends ModuleRTMPAuthenticate and overrides the onConnect, publish and releaseStream methods.

In these methods, you would test if the client is FMLE and if so call the ModuleRTMPAuthenticate method using super.

You should also make sure you call the ModuleRTMPAuthenticate method for any other methods that your custom module overrides such as onAppStart & onAppStop &onDisconnect.

Roger.

---

<div class="post-metadata">

**Author:** ![Howard\_Wu](https://avatars.discourse-cdn.com/v4/letter/h/49beb7/32.png) [@Howard\_Wu](https://community.wowza.com/u/Howard_Wu)\
**Post date:** [November 18, 2013, 6:10pm UTC](https://community.wowza.com/t/authenticate-both-fmle-and-flash-application/41599/6 "2013-11-18T18:10:37Z")

</div>

Thank you Roger.

By changing FMLE’s query string and connects to ModuleOnConnectAuthenticate2 , there won’t be any interactive pop-up dialog to input username/password …

Is there any way to bypass ModuleRTMPAuthenticate in other module (such as set connection session variables) so that the server treated the connected client as authenticated?

---

<div class="post-metadata">

**Author:** ![Lukasz\_Wnek](https://avatars.discourse-cdn.com/v4/letter/l/f04885/32.png) [@Lukasz\_Wnek](https://community.wowza.com/u/Lukasz_Wnek)\
**Post date:** [February 13, 2014, 1:26am UTC](https://community.wowza.com/t/authenticate-both-fmle-and-flash-application/41599/7 "2014-02-13T01:26:30Z")

</div>

Hello, I’m having the exact same issue. Is it possible that you post your custom class which allows both authentication methods? I would appreciate it greatly.

Lukasz
