• How to do file-based RTMP authentication with URL query strings (OnConnectAuthenticate2)

    The OnConnectAuthenticate2 module is a file-based username/password authentication method you can use with Flash applications that connect to Wowza Streaming Engine™ media server software. It uses query parameters in the RTMP URL to connect to server software. It can be used with live sources (encoders or cameras) that don't support RTMP authentication.


    For developers
    More resources


    Wowza Streaming Engine 4.0.0 or later is required.

    • If using this module, the RTMP Sources setting in your application's Source Security page must be set to Open (no authentication required).

    • When this module is enabled, all RTMP sources must provide a user name and password as query parameters in the RTMP URL.


    1. Download wse-plugin-onconnectauthenticate.zip.

    2. Extract the contents from the downloaded (zipped) package, and then copy the lib/wse-plugin-onconnectauthenticate.jar file from the package to the lib folder in your Wowza Streaming Engine installation ([install-dir]/lib).

    3. Restart Wowza Streaming Engine.


    To enable this module, add the following module definition to your application. See Configure modules for details.

    Fully Qualified Class Name
    ModuleOnConnectAuthenticate Authenticates RTMP in Flash. com.wowza.wms.plugin.OnConnectAuthenticate2


    After enabling the module, you can adjust the default settings by adding the following properties to your application. See Configure properties for details.

    /Root/Application rtmpAuthenticateFile String ${com.wowza.wms.context.VHostConfigHome}/
    Path to password file that is used to authenticate connections. (default: ${com.wowza.wms.context.VHostConfigHome}/
    /Root/Application usernamePasswordProviderClass String com.example.MyCustomClass Fully qualified class name of a custom class that is used to resolve passwords. (default: not set)


    This module uses its own password file named connect.password. By default, this file should be in the [install-dir]/conf folder. The name and location of this file can be configured using the rtmpAuthenticateFile property.

    To configure the location where this file is stored:

    1. Create a text file named connect.password in the [install-dir]/conf folder.

    2. Edit [install-dir]/conf/connect.password and add at least one line with a username and password pair (separate each username and password with a space):
      user1 pass1
      user2 pass2
    3. Save and close the file.

    The RTMP URL that you use must include the username and password as query parameters. The username is the first parameter and the password is the second parameter. For example:

    For Developers

    Source code is available on GitHub.

    Wowza Media Systems™ provides developers with a platform to create streaming applications and solutions. See Wowza Developer Tools to learn more about our APIs and SDK.

    More resources

    How to configure security using Wowza Streaming Engine Manager (RTMP Sources)

    How to do file-based RTMP authentication with NetConnection connect (OnConnectAuthenticate)

    Wowza media server software and all components, including modules, source code, and other related items offered on this page, are copyrighted (c) 2006-2016 by Wowza Media Systems, LLC, all rights reserved, and are licensed pursuant to the Wowza Media Software End User License Agreement.
    Originally Published: 02-20-2011.
    Updated: For Wowza Streaming Engine on 06-22-2016.

    If you're having problems or want to discuss this article, post in our forum.