How do I hook into new connections to ErlyVideo to run my own Erlang Authentication code? - authentication

I'm working on a video conferencing app.
We have a server running erlyVideo for internal video streaming.
We have a rest service on our web server for our erlyVideo server to call to validate session keys from our external site.
What we're stuck on is how to hook into new connections to pass the session key to the REST service to decide whether or not to terminate the connection.
Any thoughts?

What's wrong with using authentication described in their docs?
http://erlyvideo.org/authorization

You need to use apps_rewrite_play module:
{rtmp_handlers, [...., {apps_rewrite_play, "http://rest-service"},...]},

Related

How does API work with application server?

I've read that application server can be accessed via API. But I don't get the mechanism of that process. Does it work like that?
So, as for me, firstly, client sends an HTTP request to a hardware server. Here we start to looking for some data. Then, we connect with application server via API. And then something that was found in hardware server changes with application server. And after all, client receives this changed file. Am I right?
And it looks like API always works only with application server. Is it true?

java test webhooks in a unit test way in integration tests

We have a webhooks applications that only takes https as part of the callback URL. The application sends a POST request to the callback URL as a notification of some events. To be free of any 3rd party applications, we are trying to test the application using a mock/embedded web server behind the callback URL that is started by the integration test process.
However, after trying wiremock or jetty, it seems I cannot get around the SSL cert check from the webhooks application or client side, even though the callback URL can be set to https://127.0.0.1:someport :( The webhooks application we are testing resides in a different box than the one in which the integration tests are run.
Can someone please give me some hint/clue to solve this? Deeply appreciate it
thank you, a-kootstra, Actually it is not possible. I was confused. The webhooks applications lives on a separate server than the one from which tests are run. So the requests sent to localhost in our webhooks server will never reach the test server. I solved the problem by using AWS API gateway and DynamoDB. Worked perfectly. And no SSL certs issue either

Can I use a MobileFirst app without the MobileFirst server?

Can I consume a web service in a MobileFirst application without a MobileFirst server?
Yes, you can use your MobileFirst app without the need to connect to a MobileFirst server.
The drawback of not using the MobileFirst server is that you'll be loosing all of the features it provides like authentication, security, adapters, unified push notifications, direct update (for hybrid), remote disable, and other features.
If you want to make a request to any endpoint you can use WLResourceRequest (available from version 7.0 onwards) or any other native method to make HTTP requests.
Information on how to use WLResourceRequest
Android:
https://www-01.ibm.com/support/knowledgecenter/SSHS8R_7.0.0/com.ibm.worklight.apiref.doc/html/refjava-worklight-android-native/html/com/worklight/wlclient/api/WLResourceRequest.html
Hybrid:
https://www-01.ibm.com/support/knowledgecenter/SSHS8R_7.0.0/com.ibm.worklight.apiref.doc/html/refjavascript-client/html/WLResourceRequest.html?cp=SSHS8R_7.0.0%2F9-0-0-1-31
iOS: https://www-01.ibm.com/support/knowledgecenter/SSHS8R_7.0.0/com.ibm.worklight.apiref.doc/html/refobjc-worklight-ios/html/interface_w_l_resource_request.html%23a004749b662c6f4a55a3b76e47f7e6062?lang=en
If the call is for example to an external resource you can use the same plain regular AJAX calls as you would anywhere else.
If the resource is protected by MobileFirst Platform, then you must use adapters. Adapters must go through the MobileFirst Server.
Use it like simple IDE to develop application(Native and hybrid).You can use client side API also that do not connect to the mobilefirst server.
You cannot use a mobile first app if you are using MF 7.0 or higher without a server, as soon as you launch the app it invokes an authorization request something like following:
<< domain >>/<< context >>/authorization/v1/clients/instance
Which connects to your workflight server and if it doesnt get response it will fail.
As far as invoking a web service is concerned that is just javascript if you are doing hybrid you can use AJAX as mentioned in another answer. If you are building native IOS or Android you can invoke http request using sdk libraries.
Cheers !

How to monitor all lync users instant message via C# console application?

I have created UCMA trusted application using C# console application.
I want to monitor all Lync Users instant messaging calls (in one place) as well as store their conversations in the database via this console application.
Is it possible?.
If possible, please give an idea or any url.
UCMA trusted applications will only respond to traffic to the endpoints associated with that application so if you want to monitor all instant message traffic it would be the wrong API.
I would suggest using SIP Application API http://msdn.microsoft.com/en-us/library/office/hh364644(v=office.14).aspx to create a server application. This will also require the use of MSPL documented here
As Dai has asked - is the console application a requirement or will a windows service be ok?
Try our this sample application SipSnoop it basically shows all the metadata passing throught the lync server, you can tweak around it according to your requirement.

Is it possible to access to the HTTPRequest in the worklight adapter implementation?

Is is possible somehow to access the httprequest inside the code of the adater?
The root reason for asking this is a bit tricky...
I need to know the ip of the worklight server to use it later in the app for other uses.
From the app I have not found any API that could help.
Detect Worklight Server Hostname/IP Address from Worklight Client code
In the server it was possible using the WL.Server.configuration["local.IPAddress"] to get the ip but that was static and now there is no "local.IPAddress". Any way this is static.
Using J2SE API is possible to access to the network interfaces but as there can be more than one it is not the best option.
I was thinking about using the httprequest getLocalAddres method that return the ip being invoked.
Thank you
If you're talking about httprequest from client to WL server - yes, it is possible. you have WL.Server.getClientRequest() API
If you're talking about httprequest from WL server to backend - no, this is not possible. Adapter is used to abstract the need for direct usage of HTTP client internals.