Skip to main content
rjoshicool
Inspiring
February 21, 2012
Question

FMS application with server side authentication

  • February 21, 2012
  • 1 reply
  • 1597 views

I am working on creating an FMS application which does an authentication on server side too. I hvae gone through a number of tutorials and the developer guide but not able to find a correct way to start working on this.

I have been able to create a sample application which authenticates few parameters on the server side using the main.asc file with code for authentication on onConnect method.

My main doubt right now is how do I set up an application which streams videos depending on this authentication. I am confused on how to setup a new application, how to setup the application.XML, which folder to store the files etc. Can some one guide me on this or give me reference to an application which actually does. A sample/tutorial which actually setups a custom FMS application for simple video streaming from scratch step-by-step would also do.

    This topic has been closed for replies.

    1 reply

    Adobe Employee
    February 21, 2012

    I am still not clear on what you are trying to do or what is your use case. Can you briefly tell me what do you want to do after you authenticate a particular user?

    rjoshicool
    Inspiring
    February 22, 2012

    I want an FMS application where user can see videos located in a folder within the application. Whenever there is a request to play a video, the main.asc checks with a database whether the user is authorized to view that video or not. If yes, then I allow the stream to video else not. I am a bit confused on how to setup the server, application and folder structure for all this.

    February 23, 2012

    Basically there are two ways you can do that ..

    1. Use C++ authorizationplugin: In the E_CONNECT event make the database query to authenticate user. It authorized then authorize the event. You can see more details on Authorization plugins here http://help.adobe.com/en_US/flashmediaserver/plugin_apiref/group___auth_adaptor.html

    2. Use AMF PHP to handle authentication. When you get an application.onConnect, you can make a LoadVars call to PHP service and let that PHP handle authentication and give the response back, then based on the response reject or accept the connection. See the LoadVars class here http://help.adobe.com/en_US/flashmediaserver/ssaslr/WS5b3ccc516d4fbf351e63e3d11a11afc95e-7ff7SSASLR.html

    Hope this helps

    Regards,

    Abhishek