/**
  * Handles an unauthenticated access attempt by sending appropriate login headers
  *
  * @param CakeRequest $request A request object.
  * @param CakeResponse $response A response object.
  * @return void
  * @throws UnauthorizedException
  */
 public function unauthenticated(CakeRequest $request, CakeResponse $response)
 {
     $Exception = new UnauthorizedException();
     $Exception->responseHeader(array($this->loginHeaders()));
     throw $Exception;
 }
Example #2
0
 /**
  * Constructor
  *
  * @param string $problem 
  * @param string $request 
  * @param string $params 
  */
 public function __construct($problem, $request = null, $params = array())
 {
     parent::__construct($request);
     $this->problem = $problem;
     $this->params = $params;
 }