Draft Implementation in progress
We want to allow developers to add custom pages to the management portal to offer a "higher level" app management experience on top of the Stormancer Platform. These pages can include vizualizations of the game sessions, leaderboard & user activity dashboards, user/account management (ban ...)
- Display custom HTML5/js app in the management portal
- Store HTML+CSS+JS+static resources in the application package
- Enable secure & admin authenticated communication between the app & the management plugin
- Isolate the management plugin from the rest of the management app to prevent malicious plugin from obtaining sensible information including (but not limited to) authentication tokens.
- Display links to show the custom management pages
Storing plugin resources
----app root | |---- admin | |---- <plugin id> | |---- index.html | |---- <content>
A management plugin is a subdirectory of the admin directory that contains an
index.html file and additional static resources (including optional subdirectories).
index.html file contains the plugin HTML5 code and can reference additional content in the plugin using relative urls.
Accessing plugin resources
All the files in the the plugin directory (excluding
_plugin.json) can be accessed through HTTP using the following url scheme:
http(s)://api1.stormancer.com/<accounId>/<appName>/_admin/res/<plugin id>/<resource path>
Resource paths are checked to prevent access of resources outside of the plugin directory?
The Content type of the resource is computed using the path of the resource:
- If the file path matches a rule in the _plugin.json file, the associated content type is used.
- If there isn't any successful match, the default rules are used.
- Else the
application/octet-streamcontent type is used.
Default content type mappings
- *.css => text/css
- *.htm(l) => text/html
- *.png => image/png
- *.jpg => image/jpeg
- *.gif => image/gif
- *.xml => application/xml
- *.json => application/json