Example #1
0
 function loginAction()
 {
     $data = $_POST;
     try {
         $this->authService->authenticate($data['username'], $data['password']);
         $this->message("Login successful.");
     } catch (AuthenticationException $e) {
         $this->message($e->getMessage());
     }
     header('Location: index.php');
 }
Example #2
0
 public function SetSignature()
 {
     // Set signature from combining username and token
     $this->signature = \model\AuthService::Hash($this->GetUserName() . $this->GetToken());
 }
 public function GetHash()
 {
     return \model\AuthService::Hash($this->ip . $this->userAgent);
 }