CakePHP 2.X: External SESSION

1

I have the following situation:

I have my application running with CakePHP 2.X, however the authentication system is external and I do not have access to it, the only thing I was given is the $ _SESSION variables made available by the server.

Is there any way I can access these $_SESSION within CakePHP? Using the Framework features to achieve the values?

EDIT 1

Using the session_start() command, within the View I can retrieve the values, however I need to retrieve those values in Model ...

EDIT 2

public function beforeFilter() {
        parent::beforeFilter();
        if($_SESSION['chave']){
            $this->Session->write('chave', $_SESSION['chave']);
            $this->Session->write('nmCracha', $_SESSION['nmCracha']);
            $this->Session->write('prefDep', $_SESSION['prefDep']);

        }else{
            $this->redirect('http://...../index.html');
        }
    }
    
asked by anonymous 26.08.2015 / 15:27

1 answer

0

I do not see a need to use CakePHP features for this, I really do not know if there's any native resource for it. What I advise is to use pure PHP in this case, that is, working with the global $ _SESSION directly. I do not see any problem with that.

    
26.08.2015 / 15:37