Rejecting 101 requests - Ratchet\App - WSServer (Authentication)
A similar question to #604.

Currently I am extending the WebSocket\WS server in order to provide authentication on upgrade.

However, I am looking to move to the PubSub model using the provided WAMP server.

There seems to be no easy way to inject the below functionality into the \Ratchet\App instance.

I am able to close connections if not authenticated using httpRequest on connection, however, I do not wish clients to "Upgrade" at all.

The following works on a basic WS model.

```php
// OurWsServer.php

class OurWsServer extends WebSocket\WsServer
{
    use CloseResponseTrait;

    /**
     * Handles authentication before allowing upgrades
     *
     * @param ConnectionInterface $conn
     * @param RequestInterface $request
     * @return void
     */
    final public function onOpen(ConnectionInterface $conn, RequestInterface $request = null)
    {
        // Headers
        $headers = $request->getHeaders();

        // Singular JWT token
        if ($headers['Authorization'] ?? null) {
            $headers['Authorization'] = array_pop($headers['Authorization']);
        }

        // Request object to code application
        $symfonyRequest = new Request([], [], [], $headers);
        $parameters = (object)[];
        
        // Reject
        if (!IsAuthenticated::handle($symfonyRequest, $parameters)) {
            return $this->close($conn, 401);
        }

        parent::onOpen($conn, $request);
    }
}
```

Server setup
```php

// snip

// WS server
$wsServer = new OurWsServer($app /* Our app implementing MessageComponentInterface */);

// Origin check
$wsServer = new OriginCheck($wsServer, self::ORIGINS);

// HTTP server
$httpServer = new HttpServer($wsServer);

// IOServer
$server = IoServer::factory($httpServer, self::PORT);
```

Test
```php

use Ratchet\Client as Ratchet;

// Snip

public function testShouldAcceptAuthorisedUsersConnecting()
{
    $loop = Factory::create();

    // React
    $reactConnector = new React\Connector($loop, [
        'timeout' => 2
    ]);

    // Ratchet client
    $connector = new Ratchet\Connector($loop, $reactConnector);
    $promise = $connector('ws://localhost:8081', [], [
        'Authorization' => $_COOKIE['Authorization']
    ]);

    // Sync - block promise for testing
    try {
        $conn = Block\await($promise, $loop, 2);
    } catch (Exception $e) {
        $conn = null;
    } finally {
        $this->assertTrue((bool)$conn);
    }
}
```

Is there a way to achieve the above using the \Ratchet\App or would I have to extend the above?

Many thanks for support in advance,

Mike