summaryrefslogtreecommitdiff
path: root/plugins/cordova-plugin-touchid/www/touchid.js
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/cordova-plugin-touchid/www/touchid.js')
-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();