<<

NAME

pf::activation - module to view, query and manage pending activations

DESCRIPTION

pf::activation contains the functions necessary to manage all aspects of pending activation: creation, deletion, activation, etc. It also includes utility methods generate activation codes and validate them.

DEVELOPER NOTES

Notice that this module doesn't export all its subs like our other modules do. This is an attempt to shift our paradigm towards calling with package names and avoid the double naming.

For ex: pf::activation::view() instead of pf::activation::activation_view()

Remove this note when it will be no longer relevant. ;)

CONSTANTS

database

Status-related

Expiration time (in seconds)

Hashing formats related

Email activation types

SUBROUTINES

TODO: This list is incomplete

view

view a an pending activation record, returns an hashref

find_code

view an pending activation record by activation code without hash-format. Returns an hashref

find_unverified_code

find an unused pending activation record by doing a LIKE in the code, returns an hashref

view_by_code

view an pending activation record by exact activation code (including hash format). Returns an hashref

add

add an pending activation record to the database

_delete

delete an pending activation record

modify_status

update the status of a given pending activation record

invalidate_code

invalidate all unverified activation codes for a given mac and contact_info

invalidate_codes_for_mac

invalidate codes for mac

create

create a new activation code

Returns the activation code

_generate_activation_code

generate proper activation code. Created to encapsulate flexible hash types.

_unpack_activation_code

grab the hash-format and the activation hash out of the activation code

Returns a list of: hash version, hash

send_email

Send an email with the activation code

set_status_verified

Change the status of a given pending activation code to VERIFIED which means it can't be used anymore.

sms_activation_create_send

Create and send PIN code

send_sms -

Send SMS with activation code

AUTHOR

Inverse inc. <info@inverse.ca>

COPYRIGHT

Copyright (C) 2005-2015 Inverse inc.

LICENSE

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.

<<