pf::web - module to generate the different web pages.
pf::web contains the functions necessary to generate different web pages: based on pre-defined templates: login, registration, release, error, status.
It is possible to customize the behavior of this module by redefining its subs in pf::web::custom. See pf::web::custom for details.
Read the following template files: release.html, login.html, enabler.html, error.html, status.html, register.html.
Warning: The list of subroutine is incomplete
Pass message id through gettext then sprintf it.
Meant to be called from the TT templates.
Cuts in the session cookies and template rendering boiler plate.
Sub meant to be overridden in pf::web::custom to inject new variables for consumption by the Templates.
For example, to add a helpdesk phone number variable:
return { 'helpdesk_phone' => '514-555-1337' };
Afterwards it is available globally, in every template.
Called when someone clicked on /aup which is the pop-up URL for mobile phones.
Called when someone accesses /status
Handle the redirect to the proper OAuth2 Provider
Handle the redirect to the proper OAuth2 Provider
This sub is meant to be redefined by pf::web::custom to fit your specific needs. See pf::web::custom for examples.
Records User-Agent for the provided node and triggers violations.
return (0, 0) for first attempt return (1) for valid form return (0, "Error string" ) on form validation problems
return (1, message string, source id string) for successfull authentication return (0, message string, undef) otherwise
Shows a page to user saying registration is pending.
Call after you made your changes to the user / node. This takes care of handling violations, bouncing back to http for portal network access detection or handling mobile provisionning.
This was done in several different locations making maintenance more difficult than it should. It was regrouped here.
Present a generic page. Template and arguments provided to template passed as arguments
Inverse inc. <info@inverse.ca>
Minor parts of this file may have been contributed. See CREDITS.
Copyright (C) 2005-2015 Inverse inc.
Copyright (C) 2005 Kevin Amorin
Copyright (C) 2005 David LaPorte
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.