/** * beforeFilter * */ public function beforeFilter() { parent::beforeFilter(); $this->OAuth->authenticate = array('fields' => array('username' => 'email')); $this->Auth->allow($this->OAuth->allowedActions); $this->Security->blackHoleCallback = 'blackHole'; }
/** * beforeFilter * */ public function beforeFilter() { parent::beforeFilter(); $this->OAuth->allow('add'); $this->OAuth->authenticate = array('fields' => array('username' => 'email')); $this->Auth->authError = __('LC_UNAUTHORIZED', true); $this->Auth->allow($this->OAuth->allowedActions); $this->Security->blackHoleCallback = 'blackHole'; }
/** * beforeFilter * */ public function beforeFilter() { parent::beforeFilter(); // user has to be logged in to authorize $this->Auth->allow(); $this->Auth->deny('authorize'); $this->OAuth->authenticate = array('fields' => array('username' => 'email'), 'userModel' => 'Paszport.User'); $this->Auth->authError = 'Proszę się zalogować'; $this->Security->blackHoleCallback = 'blackHole'; }