Welcome! Log In Create A New Profile

Advanced

How to process Facebook signed request to determine proxy target?

February 14, 2012 10:45AM
Hello all,

we're using a Nginx as proxy gateway to several customer specific apache instances on different servers.

In order to determine where to route the traffic from a Facebook application, we need to extract the page id from the Facebook signed request (http://developers.facebook.com/docs/authentication/signed_request/) and look up its respective target apache instance in a table (probably from memcached).

As I don't have much experience with Nginx yet, I'd like to ask for your feedback on some theoretical solutions I've come up with:

1) Extract the signed request from the POST data with the HttpFormInputModule or HttpLuaModule and use HttpMemcModule for interactions with memcached.

From my understanding, this whole operation could be defined in the nginx.conf or site.conf file then, which is favorable, but I haven't found out yet if I'd be actually be able to decode the signed request for processing. Is there maybe another third party module available for this?

2) Use the EmbeddedPerlModule, which is still in experimental stage as I understand, and write a perl script similar to the php script posted on the Facebook link above to retrieve the required page id value. Then access memcached from within the script or with the HttpMemcModule.

3) Write my own Nginx module.

What would you suggest is the best way to go about this or do you maybe have better solutions?

Thanks,
Ralf
Subject Author Posted

How to process Facebook signed request to determine proxy target?

Ralf February 14, 2012 10:45AM

Re: How to process Facebook signed request to determine proxy target?

mirceapreotu September 10, 2013 11:59AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 103
Record Number of Users: 7 on May 23, 2016
Record Number of Guests: 238 on March 17, 2016
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready