Cake\Controller\Component\AuthComponent::identify PHP Method

identify() public method

Triggers Auth.afterIdentify event which the authenticate classes can listen to.
public identify ( ) : array | boolean
return array | boolean User record data, or false, if the user could not be identified.
    public function identify()
    {
        $this->_setDefaults();
        if (empty($this->_authenticateObjects)) {
            $this->constructAuthenticate();
        }
        foreach ($this->_authenticateObjects as $auth) {
            $result = $auth->authenticate($this->request, $this->response);
            if (!empty($result)) {
                $this->_authenticationProvider = $auth;
                $event = $this->dispatchEvent('Auth.afterIdentify', [$result, $auth]);
                if ($event->result !== null) {
                    return $event->result;
                }
                return $result;
            }
        }
        return false;
    }