App::MFILE::WWW::Dispatch - app dispatch stub
TBD
This is where we override the default version of the is_authorized method defined by Web::Machine::Resource.
This module is only used in standalone mode. In derived distribution mode, the application's dispatch module will be used, instead.
In the standalone demo-application mode, POST requests are used to handle login/logout requests generated by login-dialog.js.
Login requests look like this:
{ method: "LOGIN", path: "login", body: { nam: "foo", pwd: "bar" } }
and logout requests like this:
{ method: "LOGIN", path: "logout" }
In derived-distro mode, POST requests are also used to implement AJAX calls. See the process_post function in App::Dochazka::WWW::Dispatch for a real implementation.
process_post
App::Dochazka::WWW::Dispatch
Called from process_post to process login requests (special AJAX requests) originating from the JavaScript side (i.e. the login screen in login-dialog.js, via login.js).
Returns a status object - OK means the login was successful; all other statuses mean unsuccessful.
Called from process_post to process logout requests (special AJAX requests) originating from the JavaScript side.
To install App::MFILE::WWW, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::MFILE::WWW
CPAN shell
perl -MCPAN -e shell install App::MFILE::WWW
For more information on module installation, please visit the detailed CPAN module installation guide.