summaryrefslogtreecommitdiff
path: root/plugins/cordova-plugin-touchid/www
diff options
context:
space:
mode:
authorArjun Roychowdhury <pliablepixels@gmail.com>2015-09-17 16:28:48 -0400
committerArjun Roychowdhury <pliablepixels@gmail.com>2015-09-17 16:28:48 -0400
commitdf19b39f1d8a4440b9c83fd297ea7d7748ca7cc9 (patch)
tree9fac88b6f4e1177e179478ef9e9164f8405785f5 /plugins/cordova-plugin-touchid/www
parent016b7e1190568149793f62fc6c1f268d46c06c49 (diff)
TouchID support now added for PIN
Diffstat (limited to 'plugins/cordova-plugin-touchid/www')
-rw-r--r--plugins/cordova-plugin-touchid/www/touchid.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/plugins/cordova-plugin-touchid/www/touchid.js b/plugins/cordova-plugin-touchid/www/touchid.js
new file mode 100644
index 00000000..020d5f89
--- /dev/null
+++ b/plugins/cordova-plugin-touchid/www/touchid.js
@@ -0,0 +1,19 @@
+
+var exec = require("cordova/exec");
+
+var TouchID = function () {
+ this.name = "TouchID";
+};
+
+TouchID.prototype.authenticate = function (successCallback, errorCallback, text) {
+ if (!text) {
+ text = "Please authenticate via TouchID to proceed";
+ }
+ exec(successCallback, errorCallback, "TouchID", "authenticate", [text]);
+};
+
+TouchID.prototype.checkSupport = function (successCallback, errorCallback) {
+ exec(successCallback, errorCallback, "TouchID", "checkSupport");
+};
+
+module.exports = new TouchID();