aboutsummaryrefslogtreecommitdiffstats
path: root/agl-identity-service/htdocs/identity/identity-binding.js
diff options
context:
space:
mode:
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");
+}