Esempio n. 1
0
 public static function authInit()
 {
     if (!Hybrid_Endpoint::$initDone) {
         Hybrid_Endpoint::$initDone = TRUE;
         // Start a new session
         if (!session_id()) {
             session_start();
         }
         # Init Hybrid_Auth
         try {
             // Check if Hybrid_Auth session already exist
             if (!isset($_SESSION["HA::CONFIG"])) {
                 header("HTTP/1.0 404 Not Found");
                 die("You cannot access this page directly.");
             }
             Hybrid_Auth::initialize(unserialize($_SESSION["HA::CONFIG"]));
         } catch (Exception $e) {
             Hybrid_Logger::error("Endpoint: Error while trying to init Hybrid_Auth");
             header("HTTP/1.0 404 Not Found");
             die("Oophs. Error!");
         }
     }
 }
 public static function authInit()
 {
     if (!Hybrid_Endpoint::$initDone) {
         Hybrid_Endpoint::$initDone = TRUE;
         # Init Hybrid_Auth
         try {
             if (!class_exists("Hybrid_Storage")) {
                 require_once realpath(dirname(__FILE__)) . "/Storage.php";
             }
             $storage = new Hybrid_Storage();
             // Check if Hybrid_Auth session already exist
             if (!$storage->config("CONFIG")) {
                 throw new Hybrid_Exception("You cannot access this page directly.");
             }
             Hybrid_Auth::initialize($storage->config("CONFIG"));
         } catch (Exception $e) {
             Hybrid_Logger::error("Endpoint: Error while trying to init Hybrid_Auth: " . $e->getMessage());
             throw new Hybrid_Exception("Oophs. Error!");
         }
     }
 }
Esempio n. 3
0
 public static function authInit()
 {
     if (!Hybrid_Endpoint::$initDone) {
         Hybrid_Endpoint::$initDone = TRUE;
         # Init Hybrid_Auth
         try {
             require_once realpath(dirname(__FILE__)) . "/Storage.php";
             $storage = new Hybrid_Storage();
             // Check if Hybrid_Auth session already exist
             if (!$storage->config("CONFIG")) {
                 header("HTTP/1.0 404 Not Found");
                 die("You cannot access this page directly.");
             }
             Hybrid_Auth::initialize($storage->config("CONFIG"));
         } catch (Exception $e) {
             Hybrid_Logger::error("Endpoint: Error while trying to init Hybrid_Auth");
             header("HTTP/1.0 404 Not Found");
             die("Oophs. Error!");
         }
     }
 }
Esempio n. 4
0
 public static function authInit()
 {
     if (!Hybrid_Endpoint::$initDone) {
         Hybrid_Endpoint::$initDone = TRUE;
         # Init Hybrid_Auth
         try {
             $storage = new Hybrid_Storage();
             // Check if Hybrid_Auth session already exist
             if (!$storage->config("CONFIG")) {
                 throw new Hybrid_Exception("You cannot access this page directly.");
             }
             Hybrid_Auth::initialize($storage->config("CONFIG"));
         } catch (Exception $e) {
             throw new Hybrid_Exception("Oophs. Error!");
         }
     }
 }