src/Controller/Component/AuthenticationComponent.php
public function startup()
    {
        if (!$this->getConfig('requireIdentity')) {
            return;
        }

        $request = $this->getController()->request;
        $action = $request->getParam('action');
        if (in_array($action, $this->unauthenticatedActions)) {
            return;
        }

        $identity = $request->getAttribute($this->getConfig('identityAttribute'));
        if (!$identity) {
            throw new UnauthenticatedException();
        }
    }
public function startup()
    {
        if (!$this->getConfig('requireIdentity')) {
            return;
        }

        $request = $this->getController()->request;
        $action = $request->getParam('action');
        if (in_array($action, $this->unauthenticatedActions)) {
            return;
        }

        $identity = $request->getAttribute($this->getConfig('identityAttribute'));
        if (!$identity) {
            throw new UnauthenticatedException();
        }
    }
public function startup ( ) { if ( ! $ this -> getConfig ( 'requireIdentity' ) ) { return ; } $ request = $ this -> getController ( ) -> request ; $ action = $ request -> getParam ( 'action' ) ; if ( in_array ( $ action , $ this -> unauthenticatedActions ) ) { return ; } $ identity = $ request -> getAttribute ( $ this -> getConfig ( 'identityAttribute' ) ) ; if ( ! $ identity ) { throw new UnauthenticatedException ( ) ; } }
Start up event handler

@return void
@throws Exception when request is missing or has an invalid AuthenticationService
@throws UnauthenticatedException when requireIdentity is true and request is missing an identity
Start up event handler