Quantcast
Channel: Photon Server — Photon Engine
Viewing all articles
Browse latest Browse all 1557

Per-room authentication

$
0
0
Hello,

I'm looking for a way to do per-room authentication on room join requests.

Certain people are allowed to join certain rooms. I have a webserver (hosted separately from my Photon server) that's able to take in a room ID and an access token (for my service, not for photon), and use that to say whether or not the room join is allowed.

Using private rooms and making the room ID the 'password' is insufficient for my use case - the set of people who can join a given room may change over time so I need to run the check on my web server on every room join request.

The easiest way that I can find to do this is to write a Photon Plugin that intercepts the room join request and calls my webserver, passing in the room ID and my service's access token from the client. Unfortunately, I can't come up with a good way to get that client access token to the Photon server.

If there was some way to pass in arbitrary key-value pairs as part of the room join request, similar to what you can do for Photon Custom Authentication, that would be ideal. Is there a way to do this as part of Room Join requests or other Photon calls? I'm also planning to use (enterprise) Photon Cloud, so I'd only be able to make a plugin, not modify the source code further.

Thanks!

Viewing all articles
Browse latest Browse all 1557

Trending Articles