App Controller:
public $helpers = array(
'Gravatar.Gravatar',
'Html',
'Form',
'Session'
);
public $components = array(
'Auth' => array(
'authenticate' => array('Saml.Saml')
),
'Session',
'Cookie');
var $uses = array('User');
public function beforeFilter() {
parent::beforeFilter();
$this->set('convertTime', $this->convertTime);
if ($this->Saml){
if ($this->Saml->isAuthenticated()) {
$infoWSO2 = $this->Saml->getAttributes();
if($this->Session->read('UsuarioLogado') == NULL){
$userSistema = $this->User->atualizaSessao($infoWSO2);
$this->Session->write('UsuarioLogado', $userSistema);
}
$this->set('login_user', $infoWSO2);
}
}
}