summaryrefslogtreecommitdiffstats
path: root/agl-identity-service/htdocs/identity/identity-binding.js
diff options
context:
space:
mode:
authorLoïc Collignon <loic.collignon@iot.bzh>2018-01-09 17:17:14 +0100
committerLoïc Collignon <loic.collignon@iot.bzh>2018-01-09 17:17:14 +0100
commit786a2a295fd452aab5078ce4923cd5fcc2c1b464 (patch)
treead77657138f4ea3700413c7eea067d3261cb9346 /agl-identity-service/htdocs/identity/identity-binding.js
parent8886e67745c30fb40f5eee300bc96df83e75dd49 (diff)
improve the debug tools
Change-Id: I6152e3719944db82f5907ac4cc6038508e526e51 Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
Diffstat (limited to 'agl-identity-service/htdocs/identity/identity-binding.js')
-rw-r--r--agl-identity-service/htdocs/identity/identity-binding.js20
1 files changed, 18 insertions, 2 deletions
diff --git a/agl-identity-service/htdocs/identity/identity-binding.js b/agl-identity-service/htdocs/identity/identity-binding.js
index bd45c17..55dbb96 100644
--- a/agl-identity-service/htdocs/identity/identity-binding.js
+++ b/agl-identity-service/htdocs/identity/identity-binding.js
@@ -131,12 +131,28 @@ function callbinder(api, verb, query) {
ws.call(api+"/"+verb, query).then(replyok, replyerr);
}
-function fake_auth() {
+function subscribe() {
+ callbinder("identity", "subscribe", {});
+}
+
+function getIdentity() {
+ callbinder("identity", "get", {});
+}
+
+function logout() {
+ callbinder("identity", "logout", {});
+}
+
+function fakeAuth() {
var e = document.getElementById("fake-auth-kind");
var arg = {
"kind": e.options[e.selectedIndex].value,
- "key": document.getElementById("fake-auth-key").value
+ "key": (document.getElementById("fake-auth-key").value === "custom" ? document.getElementById("fake-auth-key-custom").value : document.getElementById("fake-auth-key").value)
}
callbinder("identity", "fake-auth", arg);
}
+
+function updateNfcUi() {
+ document.getElementById('fake-auth-key-custom').disabled = !(document.getElementById("fake-auth-key").value === "custom");
+}