Beispiel #1
0
 /**
  * login(): log in a user. The client must have requested a nonce first.
  * @param  string $nonce    Nonce.
  * @param  string $username Username.
  * @param  string $password Password.
  * @return TlonSoapResponse Result.
  */
 public function login($nonce, $username, $password)
 {
     if (TlonNonce::check($nonce)) {
         return $this->_login($username, $password);
     } else {
         return $this->returnFailure();
     }
 }
Beispiel #2
0
 public function testAddCheck()
 {
     $nonce = TlonNonce::add();
     $this->assertTrue((bool) $nonce);
     $this->assertTrue(TlonNonce::check($nonce));
 }