Пример #1
0
 /**
  * Save an authorisation.
  *
  * @param T_Auth $auth
  * @param int $expiry  expiry unix time
  * @return T_Auth_Driver  fluent interface
  */
 function save(T_Auth $auth, $expiry = null)
 {
     $this->session->regenerate();
     // regenerate session on change in privilege level is essential to
     // mitigate the risk of session fixation attacks
     $this->session->set($this->key, $auth);
     return $this;
 }
Пример #2
0
 function testRegenerateMethodHasAFluentInterface()
 {
     $session = new T_Session_Handler();
     $session->addDriver(new T_Test_Session_DriverStub(array()));
     $test = $session->regenerate();
     $this->assertSame($test, $session);
 }