src/apis/ProxyController.php
private function ensureBuild($machine, $buildToken)
    {
        $build = ProxyBuild::findOne(['build_token' => $buildToken, 'is_complet' => 0]);
        
        if (!$build) {
            throw new ForbiddenHttpException("Unable to find a ProxyBuild for the provided token.");
        }
        
        if (time() > $build->expiration_time) {
            throw new ForbiddenHttpException("The expiration time ".date("d.m.Y H:i:s", $build->expiration_time)." has exceeded.");
        }
        
        if ($build->proxyMachine->identifier !== $machine) {
            throw new ForbiddenHttpException("Invalid machine identifier for current build.");
        }
        
        return $build;
    }
private function ensureBuild($machine, $buildToken)
    {
        $build = ProxyBuild::findOne(['build_token' => $buildToken, 'is_complet' => 0]);
        
        if (!$build) {
            throw new ForbiddenHttpException("Unable to find a ProxyBuild for the provided token.");
        }
        
        if (time() > $build->expiration_time) {
            throw new ForbiddenHttpException("The expiration time ".date("d.m.Y H:i:s", $build->expiration_time)." has exceeded.");
        }
        
        if ($build->proxyMachine->identifier !== $machine) {
            throw new ForbiddenHttpException("Invalid machine identifier for current build.");
        }
        
        return $build;
    }
private function ensureBuild ( $ machine , $ buildToken ) { $ build = ProxyBuild :: findOne ( [ 'build_token' => $ buildToken , 'is_complet' => 0 ] ) ; if ( ! $ build ) { throw new ForbiddenHttpException ( "Unable to find a ProxyBuild for the provided token." ) ; } if ( time ( ) > $ build -> expiration_time ) { throw new ForbiddenHttpException ( "The expiration time " . date ( "d.m.Y H:i:s" , $ build -> expiration_time ) . " has exceeded." ) ; } if ( $ build -> proxyMachine -> identifier !== $ machine ) { throw new ForbiddenHttpException ( "Invalid machine identifier for current build." ) ; } return $ build ; }
Make sure the machine and token are valid.

@param string $machine
@param string $buildToken
@throws ForbiddenHttpException
@return \luya\admin\models\ProxyBuild
Make sure the machine and token are valid .