summaryrefslogtreecommitdiff
path: root/framework/Security/TAuthManager.php
diff options
context:
space:
mode:
authorxue <>2005-11-20 14:15:37 +0000
committerxue <>2005-11-20 14:15:37 +0000
commit4767317d3dcc4316609154287b643eb85afbd9e2 (patch)
treee55e155801713fd6bc0a010c0ab3eeb0374fa7cd /framework/Security/TAuthManager.php
parent0ba28834e1f3be042ab669b8336e03f70319e4a7 (diff)
Diffstat (limited to 'framework/Security/TAuthManager.php')
-rw-r--r--framework/Security/TAuthManager.php37
1 files changed, 25 insertions, 12 deletions
diff --git a/framework/Security/TAuthManager.php b/framework/Security/TAuthManager.php
index 5e9b188f..32b68cdd 100644
--- a/framework/Security/TAuthManager.php
+++ b/framework/Security/TAuthManager.php
@@ -1,9 +1,32 @@
<?php
+/**
+ * TAuthManager class file
+ *
+ * @author Qiang Xue <qiang.xue@gmail.com>
+ * @link http://www.pradosoft.com/
+ * @copyright Copyright &copy; 2005 PradoSoft
+ * @license http://www.pradosoft.com/license/
+ * @version $Revision: $ $Date: $
+ * @package System.Security
+ */
+
+/**
+ * TAuthManager class
+ *
+ * TAuthManager performs user authentication and authorization for a Prado application.
+ *
+ *
+ * @author Qiang Xue <qiang.xue@gmail.com>
+ * @version $Revision: $ $Date: $
+ * @package System.Security
+ * @since 3.0
+ */
+
+Prado::using('System.Security.TUserManager');
class TAuthManager extends TComponent implements IModule
{
const RETURN_URL_VAR='ReturnUrl';
- private $_guest='Guest';
private $_initialized=false;
private $_application;
private $_users=null;
@@ -41,16 +64,6 @@ class TAuthManager extends TComponent implements IModule
$this->_initialized=true;
}
- public function getGuestName()
- {
- return $this->_guest;
- }
-
- public function setGuestName($value)
- {
- $this->_guest=$value;
- }
-
public function getUserManager()
{
if($this->_users instanceof TUserManager)
@@ -182,7 +195,7 @@ class TAuthManager extends TComponent implements IModule
throw new TConfigurationException('authenticator_session_required');
else
{
- $userManager->logout($this->_application->getUser());
+ $userManager->switchToGuest($this->_application->getUser());
$session->destroy();
}
}