Mage_Rss_Helper_Data Class Reference

Inheritance diagram for Mage_Rss_Helper_Data:

Mage_Core_Helper_Abstract

List of all members.

Public Member Functions

 authFrontend ()
 authAdmin ($path)
 authValidate ($headers=null)
 authFailed ()


Detailed Description

Definition at line 35 of file Data.php.


Member Function Documentation

authAdmin ( path  ) 

Authenticate admin and check ACL

Parameters:
string $path

Definition at line 61 of file Data.php.

00062     {
00063         $session = Mage::getSingleton('rss/session');
00064         if ($session->isAdminLoggedIn()) {
00065             return;
00066         }
00067         list($username, $password) = $this->authValidate();
00068         Mage::getSingleton('adminhtml/url')->setNoSecret(true);
00069         $adminSession = Mage::getModel('admin/session');
00070         $user = $adminSession->login($username, $password);
00071         //$user = Mage::getModel('admin/user')->login($username, $password);
00072         if($user && $user->getId() && $user->getIsActive() == '1' && $adminSession->isAllowed($path)){
00073             $session->setAdmin($user);
00074         } else {
00075             $this->authFailed();
00076         }
00077     }

authFailed (  ) 

Send authenticate failed headers

Definition at line 95 of file Data.php.

00096     {
00097         Mage::helper('core/http')->authFailed();
00098     }

authFrontend (  ) 

Authenticate customer on frontend

Definition at line 41 of file Data.php.

00042     {
00043         $session = Mage::getSingleton('rss/session');
00044         if ($session->isCustomerLoggedIn()) {
00045             return;
00046         }
00047         list($username, $password) = $this->authValidate();
00048         $customer = Mage::getModel('customer/customer')->authenticate($username, $password);
00049         if ($customer && $customer->getId()) {
00050             Mage::getSingleton('rss/session')->settCustomer($customer);
00051         } else {
00052             $this->authFailed();
00053         }
00054     }

authValidate ( headers = null  ) 

Validate Authenticate

Parameters:
array $headers
Returns:
array

Definition at line 85 of file Data.php.

00086     {
00087         $userPass = Mage::helper('core/http')->authValidate($headers);
00088         return $userPass;
00089     }


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:24:39 2009 for Magento by  doxygen 1.5.8