From 83806c63617efa744c82760405586b3064026142 Mon Sep 17 00:00:00 2001 From: brindosch Date: Sun, 25 Aug 2019 18:22:42 +0200 Subject: [PATCH] Js apis --- assets/webconfig/js/hyperion.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/assets/webconfig/js/hyperion.js b/assets/webconfig/js/hyperion.js index e5099942..9ade4a86 100644 --- a/assets/webconfig/js/hyperion.js +++ b/assets/webconfig/js/hyperion.js @@ -165,6 +165,22 @@ function sendToHyperion(command, subcommand, msg) // ----------------------------------------------------------- // wrapped server commands +// Test if admin requires authentication +function requestRequiresAdminAuth() +{ + sendToHyperion("authorize","adminRequired"); +} +// Test if the default password needs to be changed +function requestRequiresDefaultPasswortChange() +{ + sendToHyperion("authorize","newPasswordRequired"); +} +// Change password +function requestChangePassword(oldPw, newPW) +{ + sendToHyperion("authorize","newPassword",'"password": "'+oldPw+'", "newPassword":"'+newPw+'"'); +} + function requestAuthorization() { sendToHyperion("authorize","login",'"password": "hyperion"');