3 class AuthenticationController
extends ApplicationController
5 var $_authorized_users = array('bermi' => 'secret');
7 function __construct(){
8 $this->beforeFilter(array('authenticate' => array('except' => array('index'))));
12 $this->renderText("Everyone can see me!");
16 $this->renderText("I'm only accessible if you know the password");
19 function authenticate(){
20 return $this->_authenticateOrRequestWithHttpBasic('App name', $this->_authorized_users
);