summaryrefslogtreecommitdiff
path: root/plugins/cordova-plugin-touchid
diff options
context:
space:
mode:
authorArjun Roychowdhury <pliablepixels@gmail.com>2015-10-31 08:21:38 -0400
committerArjun Roychowdhury <pliablepixels@gmail.com>2015-10-31 08:21:38 -0400
commit02811010cf62f1b21a06780d1e470d04bb24c50f (patch)
tree0d933789068aac11c810ed4bb169d14ab16c43c6 /plugins/cordova-plugin-touchid
parentbca561c1b3989d62a1fba829e0380c6fbf36caf5 (diff)
removed unecessary files from git
Diffstat (limited to 'plugins/cordova-plugin-touchid')
-rw-r--r--plugins/cordova-plugin-touchid/README.md58
-rw-r--r--plugins/cordova-plugin-touchid/package.json39
-rw-r--r--plugins/cordova-plugin-touchid/plugin.xml25
-rw-r--r--plugins/cordova-plugin-touchid/src/ios/TouchID.h13
-rw-r--r--plugins/cordova-plugin-touchid/src/ios/TouchID.m79
-rw-r--r--plugins/cordova-plugin-touchid/www/touchid.js19
6 files changed, 0 insertions, 233 deletions
diff --git a/plugins/cordova-plugin-touchid/README.md b/plugins/cordova-plugin-touchid/README.md
deleted file mode 100644
index 2001972a..00000000
--- a/plugins/cordova-plugin-touchid/README.md
+++ /dev/null
@@ -1,58 +0,0 @@
-## Touch ID Plugin for Apache Cordova
-
-Cordova Plugin to leverage the iOS local authentication framework to allow in-app user authentication using Touch ID.
-
-**Important:** You must target a real device when building. If you target the simulator, the build will fail.
-
-## 1 step install
-
-#### Latest published version on npm (with Cordova CLI >= 5.0.0)
-
-```
-cordova plugin add cordova-plugin-touchid
-```
-
-#### Latest version from GitHub
-
-```
-cordova plugin add https://github.com/leecrossley/cordova-plugin-touchid.git
-```
-
-## Usage
-
-You **do not** need to reference any JavaScript, the Cordova plugin architecture will add a touchid object to your root automatically when you build.
-
-Ensure you use the plugin after your deviceready event has been fired.
-
-### Authenticate
-
-Pass the following arguments to the `authenticate()` function, to prompt the user to authenticate via TouchID:
-
-1. Success callback (called on successful authentication)
-2. Failure callback (called on error or if authentication fails)
-3. Localised text explaining why the app needs authentication*
-
-```
-touchid.authenticate(successCallback, failureCallback, text);
-```
-
-*NOTE: The localised text you present to the user should provide a clear reason for why you are requesting they authenticate themselves, and what action you will be taking based on that authentication.
-
-### Check support
-
-Although the `authenticate()` function will return an error if the user is unable to authenticate via Touch ID, you may wish to check support without prompting the user to authenticate. This can be done by passing following arguments to the `checkSupport()` function:
-
-1. Success callback (called if authentication is possible)
-2. Not supported callback (called if policy can not be evaluated, with error message)
-
-```
-touchid.checkSupport(successCallback, notSupportedCallback);
-```
-
-## Platforms
-
-iOS 8+
-
-## License
-
-[MIT License](http://ilee.mit-license.org)
diff --git a/plugins/cordova-plugin-touchid/package.json b/plugins/cordova-plugin-touchid/package.json
deleted file mode 100644
index 3b6a77c5..00000000
--- a/plugins/cordova-plugin-touchid/package.json
+++ /dev/null
@@ -1,39 +0,0 @@
-{
- "name": "cordova-plugin-touchid",
- "version": "0.3.0",
- "author": "Lee Crossley <leee@hotmail.co.uk> (http://ilee.co.uk/)",
- "description": "Cordova Plugin to leverage the iOS local authentication framework to allow in-app user authentication using Touch ID.",
- "cordova": {
- "id": "cordova-plugin-touchid",
- "platforms": [
- "ios"
- ]
- },
- "repository": {
- "type": "git",
- "url": "git+https://github.com/leecrossley/cordova-plugin-touchid.git"
- },
- "keywords": [
- "cordova",
- "touch id",
- "touchid",
- "authentication",
- "fingerprint",
- "id",
- "login",
- "passcode",
- "ecosystem:cordova",
- "cordova-ios"
- ],
- "engines": [
- {
- "name": "cordova",
- "version": ">=3.0.0"
- }
- ],
- "license": "MIT",
- "bugs": {
- "url": "https://github.com/leecrossley/cordova-plugin-touchid/issues"
- },
- "homepage": "https://github.com/leecrossley/cordova-plugin-touchid#readme"
-}
diff --git a/plugins/cordova-plugin-touchid/plugin.xml b/plugins/cordova-plugin-touchid/plugin.xml
deleted file mode 100644
index 1331453d..00000000
--- a/plugins/cordova-plugin-touchid/plugin.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0" id="cordova-plugin-touchid" version="0.3.0">
- <name>Touch ID</name>
- <author>Lee Crossley (http://ilee.co.uk/)</author>
- <description>Cordova Plugin to leverage the iOS local authentication framework to allow in-app user authentication using Touch ID.</description>
- <keywords>cordova, touch id, touchid, authentication, fingerprint, id, login, passcode</keywords>
- <license>MIT</license>
- <engines>
- <engine name="cordova" version=">=3.0.0" />
- </engines>
- <js-module src="www/touchid.js" name="TouchID">
- <clobbers target="touchid" />
- </js-module>
- <platform name="ios">
- <config-file target="config.xml" parent="/*">
- <feature name="TouchID">
- <param name="ios-package" value="TouchID" />
- </feature>
- </config-file>
- <header-file src="src/ios/TouchID.h" />
- <source-file src="src/ios/TouchID.m" />
- <framework src="LocalAuthentication.framework" />
- <framework src="Security.framework" />
- </platform>
-</plugin>
diff --git a/plugins/cordova-plugin-touchid/src/ios/TouchID.h b/plugins/cordova-plugin-touchid/src/ios/TouchID.h
deleted file mode 100644
index d971a080..00000000
--- a/plugins/cordova-plugin-touchid/src/ios/TouchID.h
+++ /dev/null
@@ -1,13 +0,0 @@
-//
-// TouchID.h
-// Copyright (c) 2014 Lee Crossley - http://ilee.co.uk
-//
-
-#import <Cordova/CDVPlugin.h>
-
-@interface TouchID : CDVPlugin
-
-- (void) authenticate:(CDVInvokedUrlCommand*)command;
-- (void) checkSupport:(CDVInvokedUrlCommand*)command;
-
-@end
diff --git a/plugins/cordova-plugin-touchid/src/ios/TouchID.m b/plugins/cordova-plugin-touchid/src/ios/TouchID.m
deleted file mode 100644
index 0d39f7e2..00000000
--- a/plugins/cordova-plugin-touchid/src/ios/TouchID.m
+++ /dev/null
@@ -1,79 +0,0 @@
-//
-// TouchID.m
-// Copyright (c) 2014 Lee Crossley - http://ilee.co.uk
-//
-
-#import "TouchID.h"
-
-#import <LocalAuthentication/LocalAuthentication.h>
-
-@implementation TouchID
-
-- (void) authenticate:(CDVInvokedUrlCommand*)command;
-{
- NSString *text = [command.arguments objectAtIndex:0];
-
- __block CDVPluginResult* pluginResult = nil;
-
- if (NSClassFromString(@"LAContext") != nil)
- {
- LAContext *laContext = [[LAContext alloc] init];
- NSError *authError = nil;
-
- if ([laContext canEvaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics error:&authError])
- {
- [laContext evaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics localizedReason:text reply:^(BOOL success, NSError *error)
- {
- if (success)
- {
- pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK];
- }
- else
- {
- pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:[error localizedDescription]];
- }
-
- [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
- }];
- }
- else
- {
- pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:[authError localizedDescription]];
- [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
- }
- }
- else
- {
- pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR];
- [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
- }
-}
-
-- (void) checkSupport:(CDVInvokedUrlCommand*)command;
-{
-
- __block CDVPluginResult* pluginResult = nil;
-
- if (NSClassFromString(@"LAContext") != nil)
- {
- LAContext *laContext = [[LAContext alloc] init];
- NSError *authError = nil;
-
- if ([laContext canEvaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics error:&authError])
- {
- pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK];
- }
- else
- {
- pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:[authError localizedDescription]];
- }
- }
- else
- {
- pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR];
- }
-
- [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
-}
-
-@end
diff --git a/plugins/cordova-plugin-touchid/www/touchid.js b/plugins/cordova-plugin-touchid/www/touchid.js
deleted file mode 100644
index 020d5f89..00000000
--- a/plugins/cordova-plugin-touchid/www/touchid.js
+++ /dev/null
@@ -1,19 +0,0 @@
-
-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();