CAS_Client::setCacheTimesForAuthRecheck PHP Method

setCacheTimesForAuthRecheck() public method

Set the number of times authentication will be cached before rechecked.
public setCacheTimesForAuthRecheck ( integer $n ) : void
$n integer number of times to wait for a recheck
return void
    public function setCacheTimesForAuthRecheck($n)
    {
        if (gettype($n) != 'integer') {
            throw new CAS_TypeMismatchException($n, '$n', 'string');
        }
        $this->_cache_times_for_auth_recheck = $n;
    }

Usage Example

示例#1
0
文件: CAS.php 项目: DCUnit711/Demeter
 /**
  * Set the times authentication will be cached before really accessing the
  * CAS server in gateway mode:
  * - -1: check only once, and then never again (until you pree login)
  * - 0: always check
  * - n: check every "n" time
  *
  * @param int $n an integer.
  *
  * @return void
  */
 public static function setCacheTimesForAuthRecheck($n)
 {
     phpCAS::_validateClientExists();
     try {
         self::$_PHPCAS_CLIENT->setCacheTimesForAuthRecheck($n);
     } catch (Exception $e) {
         phpCAS::error(get_class($e) . ': ' . $e->getMessage());
     }
 }
CAS_Client