So this is my concept, it's basically an HTTP server, which serves some specific files that the client can access.
Spec:
HTTP server has two files.
- auth: iframe'd in client, has to have a JS function called
auth(user, pass, callback), It should contact the server securely and get a token, which should be used like this: callback({token: tokenFromServer}). That will be stored for this session by the client, accesible inside the actual app as authObj.token (the object passed to the callback is authObj).
<script>
function auth (usr, pass, cb) {
if (usr == "root" && pass == "toor") {
cb({token: "123456789"});
return true;
} else {
cb({token: ""});
return true; // This desktop manager supports login inside, so we can connect anyway.
}
}
</script>
- main: Ideally this file should be used for redirection to the app/desktop manager, but can be used for anything.
<script>
location = "exampleDE/index.html?fullscreen"
</script>
- Extras:
- Use ?fullscreen at the url for auto fullscreen
- Create the "nos-gui" enviromental variable for some power options such as: (In JSON format)
- "fullscreenDisable": Disable fullscreen even if requested by app.
- "kiosk": Disable Alt+F4, Alt+Tab, and close events. Opens NW's kiosk mode. See "instructions_for_kiosk.txt" in included example for more.
- Example: "nos-gui"={"fullscreenDisable":true,"kiosk":false}
Download example:
Linky
So this is my concept, it's basically an HTTP server, which serves some specific files that the client can access.
Spec:
HTTP server has two files.
auth(user, pass, callback), It should contact the server securely and get a token, which should be used like this:callback({token: tokenFromServer}). That will be stored for this session by the client, accesible inside the actual app asauthObj.token(the object passed to the callback isauthObj).Download example:
Linky