src/Radius.php
public function accessRequestEapMsChapV2List($serverList, $username, $password)
    {
        if (!is_array($serverList)) {
            $this->errorCode    = 127;
            $this->errorMessage = sprintf(
                'server list passed to accessRequestl must be array; %s given', gettype($serverList)
                );

            return false;
        }

        foreach($serverList as $server) {
            $this->setServer($server);

            $result = $this->accessRequestEapMsChapV2($username, $password);

            if ($result === true) {
                break; // success
            } elseif ($this->getErrorCode() === self::TYPE_ACCESS_REJECT) {
                break; // access rejected
            } else {
                /* timeout or other possible transient error; try next host */
            }
        }

        return $result;
    }
public function accessRequestEapMsChapV2List($serverList, $username, $password)
    {
        if (!is_array($serverList)) {
            $this->errorCode    = 127;
            $this->errorMessage = sprintf(
                'server list passed to accessRequestl must be array; %s given', gettype($serverList)
                );

            return false;
        }

        foreach($serverList as $server) {
            $this->setServer($server);

            $result = $this->accessRequestEapMsChapV2($username, $password);

            if ($result === true) {
                break; // success
            } elseif ($this->getErrorCode() === self::TYPE_ACCESS_REJECT) {
                break; // access rejected
            } else {
                /* timeout or other possible transient error; try next host */
            }
        }

        return $result;
    }
public function accessRequestEapMsChapV2List ( $ serverList , $ username , $ password ) { if ( ! is_array ( $ serverList ) ) { $ this -> errorCode = 127 ; $ this -> errorMessage = sprintf ( 'server list passed to accessRequestl must be array; %s given' , gettype ( $ serverList ) ) ; return false ; } foreach ( $ serverList as $ server ) { $ this -> setServer ( $ server ) ; $ result = $ this -> accessRequestEapMsChapV2 ( $ username , $ password ) ; if ( $ result === true ) { break ; // success } elseif ( $ this -> getErrorCode ( ) === self :: TYPE_ACCESS_REJECT ) { break ; // access rejected } else { /* timeout or other possible transient error; try next host */ } } return $ result ; }
Perform a EAP-MSCHAP v2 4-way authentication against a list of servers.
Each server must share the same RADIUS secret.

@see \Dapphp\Radius\Radius::accessRequestEapMsChapV2()
@see \Dapphp\Radius\Radius::accessRequestList()

@param array $serverList Array of servers to authenticate against
@param string $username  The username to authenticate as
@param string $password  The plain text password that will be hashed using MS-CHAPv2
@return boolean          true if negotiation resulted in an Access-Accept packet, false otherwise
Perform a EAP - MSCHAP v2 4 - way authentication against a list of servers . Each server must share the same RADIUS secret .