Re: [Cppcms-users] Integrated FastCGI module
Brought to you by:
artyom-beilis
From: Artyom B. <art...@ya...> - 2012-12-21 09:59:49
|
First of all you can override the main() function of topmost application and check the requests before they are dispatched for example void main(std::string url) { if(this_is_valid_url_for_the_user(url)) { // go to standard dispatching mechanism. cppcms::application::main(url); } else { response().make_error_response(401); } } Also this thread may be helpful as it discuss roughly the same http://thread.gmane.org/gmane.comp.lib.cppcms.user/691 Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >________________________________ > From: Sab <rim...@gm...> >To: cpp...@li... >Sent: Friday, December 21, 2012 11:51 AM >Subject: Re: [Cppcms-users] Integrated FastCGI module > >No, these are not static files. The client is a user interface >of a cluster controller, so the resources are basically funtions >that either control some hardware or generate an XML result as >response. > >I'm thinking now of using the regular Responder mode and implement >the authorizer functionality manually, before the request is >processed. I would like to use the cppcms dispatcher mechanism >but I'm not sure at which point I would be able to grab the >request and have the option to reject it (if the user does not >have sufficient rights). > >It would be good to do it at a central point, before the >dispatcher routes to the processing funtions. I thought that >the Init() of the object that I can pass to dispatcher::assign >could be helpful, but can I access the request (e.g. the url) >at that point and reject the execution of the assigned function >if the user does not have access right? > >Sab > > >------------------------------------------------------------------------------ >LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial >Remotely access PCs and mobile devices and provide instant support >Improve your efficiency, and focus on delivering more value-add services >Discover what IT Professionals Know. Rescue delivers >http://p.sf.net/sfu/logmein_12329d2d >_______________________________________________ >Cppcms-users mailing list >Cpp...@li... >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > |