src/Auth/AuthBasic.php
public function authenticate() {
        $authorization = $this->request->input('Authorization');
        if($authorization === null) {
            $userInfo = ['username' => 'guest', 'name' => 'guest', 'id_user' => 1];
        } else {
            $authorizationCredentials = str_replace('Basic', '', $authorization);
            list($username,$password) = explode(':',base64_decode(trim($authorizationCredentials)));

            $userInfo = $this->authModel->getRoleAndUserFromUsernamePassword($username, $password);
        }
        $this->setUsername($userInfo['username']);
        $this->setRoleName($userInfo['name']);
        $this->setUserId($userInfo['id_user']);
        $this->setDefaultLanguage($userInfo['id_user']);
    }
public function authenticate() {
        $authorization = $this->request->input('Authorization');
        if($authorization === null) {
            $userInfo = ['username' => 'guest', 'name' => 'guest', 'id_user' => 1];
        } else {
            $authorizationCredentials = str_replace('Basic', '', $authorization);
            list($username,$password) = explode(':',base64_decode(trim($authorizationCredentials)));

            $userInfo = $this->authModel->getRoleAndUserFromUsernamePassword($username, $password);
        }
        $this->setUsername($userInfo['username']);
        $this->setRoleName($userInfo['name']);
        $this->setUserId($userInfo['id_user']);
        $this->setDefaultLanguage($userInfo['id_user']);
    }
Logic of authentication.

@return void