The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

App::MFILE::WWW::Dispatch - app dispatch stub

SYNOPSIS

TBD

DESCRIPTION

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.

METHODS

process_post

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.

_login_dialog

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).

_logout

Called from process_post to process logout requests (special AJAX requests) originating from the JavaScript side.