renamed authenticator to auth and adjusted container.

This commit is contained in:
Taylor Otwell 2011-09-11 23:14:00 -05:00
parent 9db8e1bb6c
commit 3ada2cbd3e
2 changed files with 12 additions and 12 deletions

View File

@ -16,7 +16,7 @@
'laravel.auth' => array('singleton' => true, 'resolver' => function($container) 'laravel.auth' => array('singleton' => true, 'resolver' => function($container)
{ {
return new Security\Authenticator($container->resolve('laravel.config'), $container->resolve('laravel.session')); return new Security\Auth($container->resolve('laravel.config'), $container->resolve('laravel.session'));
}), }),

View File

@ -2,7 +2,7 @@
use Laravel\Session\Driver; use Laravel\Session\Driver;
class Authenticator { class Auth {
/** /**
* The current user of the application. * The current user of the application.
@ -11,19 +11,19 @@ class Authenticator {
*/ */
protected $user; protected $user;
/**
* The session driver being used by the Auth instance.
*
* @var Session\Driver
*/
protected $session;
/** /**
* The configuration manager instance. * The configuration manager instance.
* *
* @var Config * @var Config
*/ */
protected $engine; protected $config;
/**
* The session driver instance.
*
* @var Session\Driver
*/
protected $session;
/** /**
* Create a new authenticator instance. * Create a new authenticator instance.
@ -68,8 +68,8 @@ public function user()
* If the given credentials are valid, the user will be considered logged into the * If the given credentials are valid, the user will be considered logged into the
* application and their user ID will be stored in the session data. * application and their user ID will be stored in the session data.
* *
* @param string $username * @param string $username
* @param string $password * @param string $password
* @return bool * @return bool
*/ */
public function attempt($username, $password = null) public function attempt($username, $password = null)