21 Jul 2009 21:33:39 UTC
- Distribution: RWDE
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (1)
- Testers (58 / 0 / 0)
- KwaliteeBus factor: 0
- License: unknown
- Activity24 month
- Download (53.38KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest version++ed by:1 non-PAUSE userDAMJANP Damjan Pelemis
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
Authentication class to facilitate logging in users. It is assumed that there is a primary field that a user can be retrieved by, and a single password field upon which they authenticate with.
Given the appropriate parameters (lookup field,lookup value) the desired record is fetched from the database and the authentication method is executed.
Currently this method only really works when you are looking up by the class id, although there are plans to make this more flexible.
Given a login capable object, attempt to authenticate the user represented by the object.
-Verify that the object is an instance -Check the password and ensure it is correct -Check the status and make sure the user is permitted to login
If any criteria fail the appropriate exception is thrown and should be caught and handled properly
If all of these criteria are met the lastlogin field is updated to represent this successful login
Returns true if the 'password' stored in the params hash matches that of the current record, false for failed match or throws an exception otherwise.
BadPasswordException is thrown if the password is invalid
Generate a random string that is 8 characters long. This is useful for assigning random passwords to new users, after which you require them to change it after first login.