Private scenes allow developers to restrict access to scenes to players in possession of a connection token. Your application can generate connection tokens easily through a simple HTTP api request. This mechanism allow for integration with any authentication mechanism.
Creating a private scene
When creating or updating a scene from the Stormancer management portal or using the web API, you can specify wether it is public or private. Just set the
IsPublic flag to false to make the scene private.
Connecting to a private scene
Once a scene is private, call to
GetPublicScene with this scene id on clients will fail. To get proxies for private scene on clients, use the
GetScenemethod only requires the token parameters. User data and the scene id are embedded in the signed token.
Note that we don't currently provide token encryption. A crafty user could easily get access to the user data may he decide to do it. Token signature will however prevent him from altering the values.
The resulting scene object can be used like any other scene.
Creating a token
We explained that the token contains all the data required for a client to connect to a scene. But how can you application craft it?
We provide a web API to do that:
This api requires a valid x-token scoped to the application to succeed.
The request content will be embedded in the token as user data. Take note that we don't only support json user data: User data are considered as binary blobs, and can be of any format.