pf::password - module to view, query and manage temporary passwords
pf::password contains the functions necessary to manage all aspects of temporary passwords: creation, deletion, etc. utility methods generate activation codes and validate them.
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::password::view() instead of pf::password::password_view()
Remove this note when it will be no longer relevant. ;)
If you keep getting the same passwords over and over again make sure that you've got PerlChildInitHandler "sub { srand }" in your apache config.
TODO: This list is incomlete
Instantiate SQL statements to be prepared
view a temporary password record, returns an hashref
view the temporary password record associated to an email address, returns an hashref
_delete a temporary password record
Creates a temporary password record for a given pid. Valid until given expiration.
Generates the password
Generates a temporary password and add it to the temporary password table.
Returns the temporary password
Optional arguments:
Credentials won't work after expiration date
Defaults to module's default (31 days)
Credentials won't work before valid_from date
Defaults to 0 (works now)
On login, how long should this user has access?
Defaults to 0 (no per user limit)
Updates password fields from an action list
Updates password field from an action
Modify the password actions
Validate password for a given pid.
Return values: $AUTH_SUCCESS, access_duration - success $AUTH_FAILED_INVALID - invalid user/pass $AUTH_FAILED_EXPIRED - password expired $AUTH_FAILED_NOT_YET_VALID - password not valid yet
extract the type of hash for the password
Reset (change) a password for a user in the password table.
Inverse inc. <info@inverse.ca>
Copyright (C) 2005-2015 Inverse inc.
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.