[svn:p5ee] r9850 - p5ee/trunk/App-Context/lib/App

[email protected]
Newsgroups perl.cvs.p5ee
Message-ID <[email protected]>
Author: spadkins
Date: Fri Aug 17 09:09:40 2007
New Revision: 9850

Modified:
   p5ee/trunk/App-Context/lib/App/Authentication.pm

Log:
Added validate_password

Modified: p5ee/trunk/App-Context/lib/App/Authentication.pm
==============================================================================
--- p5ee/trunk/App-Context/lib/App/Authentication.pm	(original)
+++ p5ee/trunk/App-Context/lib/App/Authentication.pm	Fri Aug 17 09:09:40 2007
@@ -21,10 +21,12 @@
     use App;
 
     $context = App->context();
-    $security = $context->service("Authentication");  # or ...
-    $security = $context->authentication();
+    $authentication = $context->service("Authentication");  # or ...
+    $authentication = $context->authentication();
 
-    ... TBD ...
+    if ($authentication->validate_password($username, $password)) {
+       ...
+    }
 
 =head1 DESCRIPTION
 
@@ -112,12 +114,12 @@
 =cut
 
 #############################################################################
-# get_username()
+# validate_password()
 #############################################################################
 
-=head2 get_username()
+=head2 validate_password()
 
-    * Signature: $username = $auth->get_username();
+    * Signature: $username = $auth->validate_password();
     * Param:     void
     * Return:    $username        string
     * Throws:    App::Exception::Authentication
@@ -125,11 +127,11 @@
 
     Sample Usage:
 
-    $username = $auth->get_username();
+    $username = $auth->validate_password();
 
 =cut
 
-sub authenticate {
+sub validate_password {
     my ($self, $username, $password) = @_;
     return(1);
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.