Luke Dennis
Luke Dennis

Reputation: 14550

Authentication using Orbited, STOMP, and MorbidQ

I'm using Orbited to build a Comet chat system on a PHP-based website. However, currently any user can subscribe or post to any channel.

What I'm looking to do is have the browser listen for updates directly from the Orbited server, and have all other actions (subscribe, send) handled by a PHP authentication layer, which communicates with Orbited via sockets. Is there a way to do this, or am I going to need a more robust messaging queue?

Upvotes: 2

Views: 815

Answers (2)

pl.
pl.

Reputation: 1

If you are using MorbiQ, you should check out the RestQ plugin (http://www.morbidq.com/trac/wiki/RestQ).

Upvotes: 0

Pawel Furmaniak
Pawel Furmaniak

Reputation: 4816

You can make the users subscribe to the individual channels.

Do the message posting through the PHP script (AJAX call), which will:

  • check if the sender is authenticated
  • post the message to the autenticated users (iterate over authenticated user list and send each user the message)

How to send the STOMP message from PHP? Use the PHP STOMP client.

Upvotes: 1

Related Questions