phpPoA2
[ class tree: phpPoA2 ] [ index: phpPoA2 ] [ all elements ]

Source for file PAPIConfigurator.php

Documentation is available at PAPIConfigurator.php

  1. <?php
  2. /**
  3.  * @copyright Copyright 2005-2010 RedIRIS, http://www.rediris.es/
  4.  *
  5.  *  This file is part of phpPoA2.
  6.  *
  7.  *  phpPoA2 is free software: you can redistribute it and/or modify
  8.  *  it under the terms of the GNU General Public License as published by
  9.  *  the Free Software Foundation, either version 3 of the License, or
  10.  *  (at your option) any later version.
  11.  *
  12.  *  phpPoA2 is distributed in the hope that it will be useful,
  13.  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15.  *  GNU General Public License for more details.
  16.  *
  17.  *  You should have received a copy of the GNU General Public License
  18.  *  along with phpPoA2. If not, see <http://www.gnu.org/licenses/>.
  19.  *
  20.  * @license http://www.gnu.org/licenses/gpl.html GNU General Public License
  21.  * @version 2.0
  22.  * @author Jaime Perez <jaime.perez@rediris.es>
  23.  * @filesource
  24.  */
  25.  
  26. /**
  27.  * Configurator class for the PAPI Authentication Engine.
  28.  * @package phpPoA2
  29.  * @subpackage PAPIAuthenticationEngine
  30.  */
  31.  
  32.     protected $mandatory_options = array('Location',
  33.                                          'CookieDomain',
  34.                                          'LKey',
  35.                                          'PubKeyFile',
  36.                                          'CookieTimeout',
  37.                                          'DBType',
  38.                                          'RedirectURL',
  39.                                          'RedirectType');
  40.  
  41.     /**
  42.      * 
  43.      * @return string 
  44.      */
  45.     public function getLocation({
  46.         return $this->cfg['Location'];
  47.     }
  48.  
  49.     /**
  50.      * 
  51.      * @return string 
  52.      */
  53.     public function getCookieDomain({
  54.         return $this->cfg['CookieDomain'];
  55.     }
  56.  
  57.     /**
  58.      * 
  59.      * @return string 
  60.      */
  61.     public function getLKey({
  62.         return $this->cfg['LKey'];
  63.     }
  64.  
  65.     /**
  66.      * 
  67.      * @return string 
  68.      */
  69.     public function getPubKeyFile({
  70.         return $this->cfg['PubKeyFile'];
  71.     }
  72.  
  73.     /**
  74.      * 
  75.      * @return integer 
  76.      */
  77.     public function getCookieTimeout({
  78.         return $this->cfg['CookieTimeout'];
  79.     }
  80.  
  81.     /**
  82.      * 
  83.      * @return integer 
  84.      */
  85.     public function getDBType({
  86.         return $this->cfg['DBType'];
  87.     }
  88.  
  89.     /**
  90.      * 
  91.      * @return string 
  92.      */
  93.     public function getDBFile({
  94.         return @$this->cfg['DBFile'];
  95.     }
  96.  
  97.     /**
  98.      * 
  99.      * @return string 
  100.      */
  101.     public function getDBHost({
  102.         return @$this->cfg['DBHost'];
  103.     }
  104.  
  105.     /**
  106.      * 
  107.      * @return string 
  108.      */
  109.     public function getDBUser({
  110.         return @$this->cfg['DBUser'];
  111.     }
  112.  
  113.     /**
  114.      * 
  115.      * @return string 
  116.      */
  117.     public function getDBPassword({
  118.         return @$this->cfg['DBPassword'];
  119.     }
  120.  
  121.     /**
  122.      * 
  123.      * @return string 
  124.      */
  125.     public function getDBName({
  126.         return @$this->cfg['DBName'];
  127.     }
  128.  
  129.     /**
  130.      *
  131.      * @return string 
  132.      */
  133.     public function getDBPrefix({
  134.         return @$this->cfg['DBPrefix'];
  135.     }
  136.  
  137.     /**
  138.      * 
  139.      * @return string 
  140.      */
  141.     public function getRedirectURL({
  142.         return $this->cfg['RedirectURL'];
  143.     }
  144.  
  145.     /**
  146.      * 
  147.      * @return integer 
  148.      */
  149.     public function getRedirectType({
  150.         switch ($this->cfg['RedirectType']{
  151.         case GPOA_T:
  152.         case "GPoA":
  153.         case "GPOA":
  154.         case "GPOA_T":
  155.         case "GPoA_T":
  156.             return GPOA_T;
  157.         case AS_T:
  158.         case "AS":
  159.         case "AS_T":
  160.             return AS_T;
  161.         }
  162.     }
  163.  
  164.     /**
  165.      * 
  166.      * @return string 
  167.      */
  168.     public function getHomeLocatorID({
  169.         return @$this->cfg['HomeLocatorID'];
  170.     }
  171.  
  172.     /**
  173.      * 
  174.      * @return string 
  175.      */
  176.     public function getID({
  177.         return @$this->cfg['ID'];
  178.     }
  179.  
  180.     /**
  181.      *
  182.      * @return string 
  183.      */
  184.     public function getFriendlyName({
  185.         return @$this->cfg['FriendlyName'];
  186.     }
  187.  
  188.     /**
  189.      * 
  190.      * @return string 
  191.      */
  192.     public function getLogoutURL({
  193.         return @$this->cfg['LogoutURL'];
  194.     }
  195.  
  196.     /**
  197.      *
  198.      * @return seconds 
  199.      */
  200.     public function getRequestLifetime({
  201.         if (is_numeric(@$this->cfg['RequestLifetime']))
  202.             return @$this->cfg['RequestLifetime'];
  203.  
  204.         return REQUEST_LIFETIME
  205.     }
  206.  
  207. }
  208.  
  209. ?>

Documentation generated on Wed, 13 Oct 2010 15:06:21 +0200 by phpDocumentor 1.4.3