@capgo/capacitor-native-biometric 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CapgoCapacitorNativeBiometric.podspec +13 -0
- package/LICENSE +21 -0
- package/android/.gradle/8.0.2/checksums/checksums.lock +0 -0
- package/android/.gradle/8.0.2/dependencies-accessors/dependencies-accessors.lock +0 -0
- package/android/.gradle/8.0.2/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/8.0.2/executionHistory/executionHistory.bin +0 -0
- package/android/.gradle/8.0.2/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/8.0.2/fileChanges/last-build.bin +0 -0
- package/android/.gradle/8.0.2/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/8.0.2/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/8.0.2/fileHashes/resourceHashesCache.bin +0 -0
- package/android/.gradle/8.0.2/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
- package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/android.iml +40 -0
- package/android/build.gradle +59 -0
- package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +6 -0
- package/android/gradle.properties +20 -0
- package/android/gradlew +244 -0
- package/android/gradlew.bat +92 -0
- package/android/local.properties +8 -0
- package/android/proguard-rules.pro +21 -0
- package/android/settings.gradle +2 -0
- package/android/src/androidTest/java/com/getcapacitor/android/ExampleInstrumentedTest.java +28 -0
- package/android/src/main/AndroidManifest.xml +12 -0
- package/android/src/main/java/ee/forgr/biometric/AuthActivity.java +129 -0
- package/android/src/main/java/ee/forgr/biometric/NativeBiometric.java +457 -0
- package/android/src/main/res/layout/activity_auth_acitivy.xml +12 -0
- package/android/src/main/res/layout/bridge_layout_main.xml +15 -0
- package/android/src/main/res/navigation/nav_graph.xml +28 -0
- package/android/src/main/res/values/colors.xml +3 -0
- package/android/src/main/res/values/dimens.xml +3 -0
- package/android/src/main/res/values/strings.xml +12 -0
- package/android/src/main/res/values/styles.xml +16 -0
- package/android/src/test/java/com/getcapacitor/ExampleUnitTest.java +18 -0
- package/dist/docs.json +426 -0
- package/dist/esm/definitions.d.ts +91 -0
- package/dist/esm/definitions.js +11 -0
- package/dist/esm/definitions.js.map +1 -0
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.js +7 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/web.d.ts +10 -0
- package/dist/esm/web.js +22 -0
- package/dist/esm/web.js.map +1 -0
- package/dist/plugin.cjs.js +47 -0
- package/dist/plugin.cjs.js.map +1 -0
- package/dist/plugin.js +50 -0
- package/dist/plugin.js.map +1 -0
- package/ios/Plugin/Info.plist +24 -0
- package/ios/Plugin/Plugin.h +10 -0
- package/ios/Plugin/Plugin.m +12 -0
- package/ios/Plugin/Plugin.swift +264 -0
- package/ios/Plugin.xcodeproj/project.pbxproj +554 -0
- package/ios/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- package/ios/Plugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/ios/Plugin.xcodeproj/project.xcworkspace/xcuserdata/pilito.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/ios/Plugin.xcodeproj/xcuserdata/jmartinez.xcuserdatad/xcschemes/xcschememanagement.plist +14 -0
- package/ios/Plugin.xcodeproj/xcuserdata/josemartinez.xcuserdatad/xcschemes/xcschememanagement.plist +14 -0
- package/ios/Plugin.xcodeproj/xcuserdata/pilito.xcuserdatad/xcschemes/xcschememanagement.plist +14 -0
- package/ios/Plugin.xcworkspace/contents.xcworkspacedata +10 -0
- package/ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/ios/Plugin.xcworkspace/xcuserdata/jmartinez.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/ios/Plugin.xcworkspace/xcuserdata/josemartinez.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/ios/Plugin.xcworkspace/xcuserdata/pilito.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/ios/PluginTests/Info.plist +22 -0
- package/ios/PluginTests/PluginTests.swift +35 -0
- package/ios/Podfile +16 -0
- package/ios/Podfile.lock +22 -0
- package/ios/Pods/Local Podspecs/Capacitor.podspec.json +34 -0
- package/ios/Pods/Local Podspecs/CapacitorCordova.podspec.json +26 -0
- package/ios/Pods/Manifest.lock +22 -0
- package/ios/Pods/Pods.xcodeproj/project.pbxproj +1626 -0
- package/ios/Pods/Pods.xcodeproj/xcuserdata/jmartinez.xcuserdatad/xcschemes/Capacitor.xcscheme +60 -0
- package/ios/Pods/Pods.xcodeproj/xcuserdata/jmartinez.xcuserdatad/xcschemes/CapacitorCordova.xcscheme +58 -0
- package/ios/Pods/Pods.xcodeproj/xcuserdata/jmartinez.xcuserdatad/xcschemes/Pods-Plugin.xcscheme +58 -0
- package/ios/Pods/Pods.xcodeproj/xcuserdata/jmartinez.xcuserdatad/xcschemes/Pods-PluginTests.xcscheme +58 -0
- package/ios/Pods/Pods.xcodeproj/xcuserdata/jmartinez.xcuserdatad/xcschemes/xcschememanagement.plist +39 -0
- package/ios/Pods/Pods.xcodeproj/xcuserdata/josemartinez.xcuserdatad/xcschemes/Capacitor.xcscheme +60 -0
- package/ios/Pods/Pods.xcodeproj/xcuserdata/josemartinez.xcuserdatad/xcschemes/CapacitorCordova.xcscheme +58 -0
- package/ios/Pods/Pods.xcodeproj/xcuserdata/josemartinez.xcuserdatad/xcschemes/Pods-Plugin.xcscheme +58 -0
- package/ios/Pods/Pods.xcodeproj/xcuserdata/josemartinez.xcuserdatad/xcschemes/Pods-PluginTests.xcscheme +58 -0
- package/ios/Pods/Pods.xcodeproj/xcuserdata/josemartinez.xcuserdatad/xcschemes/xcschememanagement.plist +39 -0
- package/ios/Pods/Pods.xcodeproj/xcuserdata/martindonadieu.xcuserdatad/xcschemes/Capacitor.xcscheme +58 -0
- package/ios/Pods/Pods.xcodeproj/xcuserdata/martindonadieu.xcuserdatad/xcschemes/CapacitorCordova.xcscheme +58 -0
- package/ios/Pods/Pods.xcodeproj/xcuserdata/martindonadieu.xcuserdatad/xcschemes/Pods-Plugin.xcscheme +58 -0
- package/ios/Pods/Pods.xcodeproj/xcuserdata/martindonadieu.xcuserdatad/xcschemes/Pods-PluginTests.xcscheme +58 -0
- package/ios/Pods/Pods.xcodeproj/xcuserdata/martindonadieu.xcuserdatad/xcschemes/xcschememanagement.plist +31 -0
- package/ios/Pods/Pods.xcodeproj/xcuserdata/pilito.xcuserdatad/xcschemes/xcschememanagement.plist +29 -0
- package/ios/Pods/Target Support Files/Capacitor/Capacitor-Info.plist +26 -0
- package/ios/Pods/Target Support Files/Capacitor/Capacitor-dummy.m +5 -0
- package/ios/Pods/Target Support Files/Capacitor/Capacitor-prefix.pch +12 -0
- package/ios/Pods/Target Support Files/Capacitor/Capacitor-umbrella.h +23 -0
- package/ios/Pods/Target Support Files/Capacitor/Capacitor.debug.xcconfig +16 -0
- package/ios/Pods/Target Support Files/Capacitor/Capacitor.modulemap +8 -0
- package/ios/Pods/Target Support Files/Capacitor/Capacitor.release.xcconfig +16 -0
- package/ios/Pods/Target Support Files/CapacitorCordova/CapacitorCordova-Info.plist +26 -0
- package/ios/Pods/Target Support Files/CapacitorCordova/CapacitorCordova-dummy.m +5 -0
- package/ios/Pods/Target Support Files/CapacitorCordova/CapacitorCordova-prefix.pch +12 -0
- package/ios/Pods/Target Support Files/CapacitorCordova/CapacitorCordova-umbrella.h +32 -0
- package/ios/Pods/Target Support Files/CapacitorCordova/CapacitorCordova.debug.xcconfig +13 -0
- package/ios/Pods/Target Support Files/CapacitorCordova/CapacitorCordova.modulemap +6 -0
- package/ios/Pods/Target Support Files/CapacitorCordova/CapacitorCordova.release.xcconfig +13 -0
- package/ios/Pods/Target Support Files/Pods-Plugin/Pods-Plugin-Info.plist +26 -0
- package/ios/Pods/Target Support Files/Pods-Plugin/Pods-Plugin-acknowledgements.markdown +53 -0
- package/ios/Pods/Target Support Files/Pods-Plugin/Pods-Plugin-acknowledgements.plist +91 -0
- package/ios/Pods/Target Support Files/Pods-Plugin/Pods-Plugin-dummy.m +5 -0
- package/ios/Pods/Target Support Files/Pods-Plugin/Pods-Plugin-umbrella.h +16 -0
- package/ios/Pods/Target Support Files/Pods-Plugin/Pods-Plugin.debug.xcconfig +14 -0
- package/ios/Pods/Target Support Files/Pods-Plugin/Pods-Plugin.modulemap +6 -0
- package/ios/Pods/Target Support Files/Pods-Plugin/Pods-Plugin.release.xcconfig +14 -0
- package/ios/Pods/Target Support Files/Pods-PluginTests/Pods-PluginTests-Info.plist +26 -0
- package/ios/Pods/Target Support Files/Pods-PluginTests/Pods-PluginTests-acknowledgements.markdown +53 -0
- package/ios/Pods/Target Support Files/Pods-PluginTests/Pods-PluginTests-acknowledgements.plist +91 -0
- package/ios/Pods/Target Support Files/Pods-PluginTests/Pods-PluginTests-dummy.m +5 -0
- package/ios/Pods/Target Support Files/Pods-PluginTests/Pods-PluginTests-frameworks.sh +188 -0
- package/ios/Pods/Target Support Files/Pods-PluginTests/Pods-PluginTests-umbrella.h +16 -0
- package/ios/Pods/Target Support Files/Pods-PluginTests/Pods-PluginTests.debug.xcconfig +15 -0
- package/ios/Pods/Target Support Files/Pods-PluginTests/Pods-PluginTests.modulemap +6 -0
- package/ios/Pods/Target Support Files/Pods-PluginTests/Pods-PluginTests.release.xcconfig +15 -0
- package/package.json +80 -0
- package/readme.md +284 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
package com.getcapacitor;
|
|
2
|
+
|
|
3
|
+
import static org.junit.Assert.*;
|
|
4
|
+
|
|
5
|
+
import org.junit.Test;
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Example local unit test, which will execute on the development machine (host).
|
|
9
|
+
*
|
|
10
|
+
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
|
11
|
+
*/
|
|
12
|
+
public class ExampleUnitTest {
|
|
13
|
+
|
|
14
|
+
@Test
|
|
15
|
+
public void addition_isCorrect() throws Exception {
|
|
16
|
+
assertEquals(4, 2 + 2);
|
|
17
|
+
}
|
|
18
|
+
}
|
package/dist/docs.json
ADDED
|
@@ -0,0 +1,426 @@
|
|
|
1
|
+
{
|
|
2
|
+
"api": {
|
|
3
|
+
"name": "NativeBiometricPlugin",
|
|
4
|
+
"slug": "nativebiometricplugin",
|
|
5
|
+
"docs": "",
|
|
6
|
+
"tags": [],
|
|
7
|
+
"methods": [
|
|
8
|
+
{
|
|
9
|
+
"name": "isAvailable",
|
|
10
|
+
"signature": "(options?: IsAvailableOptions) => any",
|
|
11
|
+
"parameters": [
|
|
12
|
+
{
|
|
13
|
+
"name": "options",
|
|
14
|
+
"docs": "",
|
|
15
|
+
"type": "IsAvailableOptions"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"returns": "any",
|
|
19
|
+
"tags": [
|
|
20
|
+
{
|
|
21
|
+
"name": "param",
|
|
22
|
+
"text": "options"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"name": "returns"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"name": "memberof",
|
|
29
|
+
"text": "NativeBiometricPlugin"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "since",
|
|
33
|
+
"text": "1.0.0"
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
"docs": "Checks if biometric authentication hardware is available.",
|
|
37
|
+
"complexTypes": [
|
|
38
|
+
"IsAvailableOptions",
|
|
39
|
+
"AvailableResult"
|
|
40
|
+
],
|
|
41
|
+
"slug": "isavailable"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "verifyIdentity",
|
|
45
|
+
"signature": "(options?: BiometricOptions) => any",
|
|
46
|
+
"parameters": [
|
|
47
|
+
{
|
|
48
|
+
"name": "options",
|
|
49
|
+
"docs": "",
|
|
50
|
+
"type": "BiometricOptions"
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
"returns": "any",
|
|
54
|
+
"tags": [
|
|
55
|
+
{
|
|
56
|
+
"name": "param",
|
|
57
|
+
"text": "options"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"name": "returns"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"name": "memberof",
|
|
64
|
+
"text": "NativeBiometricPlugin"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"name": "since",
|
|
68
|
+
"text": "1.0.0"
|
|
69
|
+
}
|
|
70
|
+
],
|
|
71
|
+
"docs": "Prompts the user to authenticate with biometrics.",
|
|
72
|
+
"complexTypes": [
|
|
73
|
+
"BiometricOptions"
|
|
74
|
+
],
|
|
75
|
+
"slug": "verifyidentity"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"name": "getCredentials",
|
|
79
|
+
"signature": "(options: GetCredentialOptions) => any",
|
|
80
|
+
"parameters": [
|
|
81
|
+
{
|
|
82
|
+
"name": "options",
|
|
83
|
+
"docs": "",
|
|
84
|
+
"type": "GetCredentialOptions"
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
"returns": "any",
|
|
88
|
+
"tags": [
|
|
89
|
+
{
|
|
90
|
+
"name": "param",
|
|
91
|
+
"text": "options"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"name": "returns"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"name": "memberof",
|
|
98
|
+
"text": "NativeBiometricPlugin"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"name": "since",
|
|
102
|
+
"text": "1.0.0"
|
|
103
|
+
}
|
|
104
|
+
],
|
|
105
|
+
"docs": "Gets the stored credentials for a given server.",
|
|
106
|
+
"complexTypes": [
|
|
107
|
+
"GetCredentialOptions",
|
|
108
|
+
"Credentials"
|
|
109
|
+
],
|
|
110
|
+
"slug": "getcredentials"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"name": "setCredentials",
|
|
114
|
+
"signature": "(options: SetCredentialOptions) => any",
|
|
115
|
+
"parameters": [
|
|
116
|
+
{
|
|
117
|
+
"name": "options",
|
|
118
|
+
"docs": "",
|
|
119
|
+
"type": "SetCredentialOptions"
|
|
120
|
+
}
|
|
121
|
+
],
|
|
122
|
+
"returns": "any",
|
|
123
|
+
"tags": [
|
|
124
|
+
{
|
|
125
|
+
"name": "param",
|
|
126
|
+
"text": "options"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"name": "returns"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"name": "memberof",
|
|
133
|
+
"text": "NativeBiometricPlugin"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"name": "since",
|
|
137
|
+
"text": "1.0.0"
|
|
138
|
+
}
|
|
139
|
+
],
|
|
140
|
+
"docs": "Stores the given credentials for a given server.",
|
|
141
|
+
"complexTypes": [
|
|
142
|
+
"SetCredentialOptions"
|
|
143
|
+
],
|
|
144
|
+
"slug": "setcredentials"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"name": "deleteCredentials",
|
|
148
|
+
"signature": "(options: DeleteCredentialOptions) => any",
|
|
149
|
+
"parameters": [
|
|
150
|
+
{
|
|
151
|
+
"name": "options",
|
|
152
|
+
"docs": "",
|
|
153
|
+
"type": "DeleteCredentialOptions"
|
|
154
|
+
}
|
|
155
|
+
],
|
|
156
|
+
"returns": "any",
|
|
157
|
+
"tags": [
|
|
158
|
+
{
|
|
159
|
+
"name": "param",
|
|
160
|
+
"text": "options"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"name": "returns"
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"name": "memberof",
|
|
167
|
+
"text": "NativeBiometricPlugin"
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"name": "since",
|
|
171
|
+
"text": "1.0.0"
|
|
172
|
+
}
|
|
173
|
+
],
|
|
174
|
+
"docs": "Deletes the stored credentials for a given server.",
|
|
175
|
+
"complexTypes": [
|
|
176
|
+
"DeleteCredentialOptions"
|
|
177
|
+
],
|
|
178
|
+
"slug": "deletecredentials"
|
|
179
|
+
}
|
|
180
|
+
],
|
|
181
|
+
"properties": []
|
|
182
|
+
},
|
|
183
|
+
"interfaces": [
|
|
184
|
+
{
|
|
185
|
+
"name": "IsAvailableOptions",
|
|
186
|
+
"slug": "isavailableoptions",
|
|
187
|
+
"docs": "",
|
|
188
|
+
"tags": [],
|
|
189
|
+
"methods": [],
|
|
190
|
+
"properties": [
|
|
191
|
+
{
|
|
192
|
+
"name": "useFallback",
|
|
193
|
+
"tags": [],
|
|
194
|
+
"docs": "Specifies if should fallback to passcode authentication if biometric authentication is not available.",
|
|
195
|
+
"complexTypes": [],
|
|
196
|
+
"type": "boolean"
|
|
197
|
+
}
|
|
198
|
+
]
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
"name": "AvailableResult",
|
|
202
|
+
"slug": "availableresult",
|
|
203
|
+
"docs": "",
|
|
204
|
+
"tags": [],
|
|
205
|
+
"methods": [],
|
|
206
|
+
"properties": [
|
|
207
|
+
{
|
|
208
|
+
"name": "isAvailable",
|
|
209
|
+
"tags": [],
|
|
210
|
+
"docs": "",
|
|
211
|
+
"complexTypes": [],
|
|
212
|
+
"type": "boolean"
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"name": "biometryType",
|
|
216
|
+
"tags": [],
|
|
217
|
+
"docs": "",
|
|
218
|
+
"complexTypes": [
|
|
219
|
+
"BiometryType"
|
|
220
|
+
],
|
|
221
|
+
"type": "BiometryType"
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
"name": "errorCode",
|
|
225
|
+
"tags": [],
|
|
226
|
+
"docs": "",
|
|
227
|
+
"complexTypes": [],
|
|
228
|
+
"type": "number"
|
|
229
|
+
}
|
|
230
|
+
]
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
"name": "BiometricOptions",
|
|
234
|
+
"slug": "biometricoptions",
|
|
235
|
+
"docs": "",
|
|
236
|
+
"tags": [],
|
|
237
|
+
"methods": [],
|
|
238
|
+
"properties": [
|
|
239
|
+
{
|
|
240
|
+
"name": "reason",
|
|
241
|
+
"tags": [],
|
|
242
|
+
"docs": "",
|
|
243
|
+
"complexTypes": [],
|
|
244
|
+
"type": "string"
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"name": "title",
|
|
248
|
+
"tags": [],
|
|
249
|
+
"docs": "",
|
|
250
|
+
"complexTypes": [],
|
|
251
|
+
"type": "string"
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
"name": "subtitle",
|
|
255
|
+
"tags": [],
|
|
256
|
+
"docs": "",
|
|
257
|
+
"complexTypes": [],
|
|
258
|
+
"type": "string"
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"name": "description",
|
|
262
|
+
"tags": [],
|
|
263
|
+
"docs": "",
|
|
264
|
+
"complexTypes": [],
|
|
265
|
+
"type": "string"
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
"name": "negativeButtonText",
|
|
269
|
+
"tags": [],
|
|
270
|
+
"docs": "",
|
|
271
|
+
"complexTypes": [],
|
|
272
|
+
"type": "string"
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
"name": "useFallback",
|
|
276
|
+
"tags": [],
|
|
277
|
+
"docs": "",
|
|
278
|
+
"complexTypes": [],
|
|
279
|
+
"type": "boolean"
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
"name": "maxAttempts",
|
|
283
|
+
"tags": [
|
|
284
|
+
{
|
|
285
|
+
"text": "1",
|
|
286
|
+
"name": "default"
|
|
287
|
+
}
|
|
288
|
+
],
|
|
289
|
+
"docs": "Only for Android.\nSet a maximum number of attempts for biometric authentication. The maximum allowed by android is 5.",
|
|
290
|
+
"complexTypes": [],
|
|
291
|
+
"type": "number"
|
|
292
|
+
}
|
|
293
|
+
]
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
"name": "GetCredentialOptions",
|
|
297
|
+
"slug": "getcredentialoptions",
|
|
298
|
+
"docs": "",
|
|
299
|
+
"tags": [],
|
|
300
|
+
"methods": [],
|
|
301
|
+
"properties": [
|
|
302
|
+
{
|
|
303
|
+
"name": "server",
|
|
304
|
+
"tags": [],
|
|
305
|
+
"docs": "",
|
|
306
|
+
"complexTypes": [],
|
|
307
|
+
"type": "string"
|
|
308
|
+
}
|
|
309
|
+
]
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
"name": "Credentials",
|
|
313
|
+
"slug": "credentials",
|
|
314
|
+
"docs": "",
|
|
315
|
+
"tags": [],
|
|
316
|
+
"methods": [],
|
|
317
|
+
"properties": [
|
|
318
|
+
{
|
|
319
|
+
"name": "username",
|
|
320
|
+
"tags": [],
|
|
321
|
+
"docs": "",
|
|
322
|
+
"complexTypes": [],
|
|
323
|
+
"type": "string"
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
"name": "password",
|
|
327
|
+
"tags": [],
|
|
328
|
+
"docs": "",
|
|
329
|
+
"complexTypes": [],
|
|
330
|
+
"type": "string"
|
|
331
|
+
}
|
|
332
|
+
]
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
"name": "SetCredentialOptions",
|
|
336
|
+
"slug": "setcredentialoptions",
|
|
337
|
+
"docs": "",
|
|
338
|
+
"tags": [],
|
|
339
|
+
"methods": [],
|
|
340
|
+
"properties": [
|
|
341
|
+
{
|
|
342
|
+
"name": "username",
|
|
343
|
+
"tags": [],
|
|
344
|
+
"docs": "",
|
|
345
|
+
"complexTypes": [],
|
|
346
|
+
"type": "string"
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
"name": "password",
|
|
350
|
+
"tags": [],
|
|
351
|
+
"docs": "",
|
|
352
|
+
"complexTypes": [],
|
|
353
|
+
"type": "string"
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
"name": "server",
|
|
357
|
+
"tags": [],
|
|
358
|
+
"docs": "",
|
|
359
|
+
"complexTypes": [],
|
|
360
|
+
"type": "string"
|
|
361
|
+
}
|
|
362
|
+
]
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
"name": "DeleteCredentialOptions",
|
|
366
|
+
"slug": "deletecredentialoptions",
|
|
367
|
+
"docs": "",
|
|
368
|
+
"tags": [],
|
|
369
|
+
"methods": [],
|
|
370
|
+
"properties": [
|
|
371
|
+
{
|
|
372
|
+
"name": "server",
|
|
373
|
+
"tags": [],
|
|
374
|
+
"docs": "",
|
|
375
|
+
"complexTypes": [],
|
|
376
|
+
"type": "string"
|
|
377
|
+
}
|
|
378
|
+
]
|
|
379
|
+
}
|
|
380
|
+
],
|
|
381
|
+
"enums": [
|
|
382
|
+
{
|
|
383
|
+
"name": "BiometryType",
|
|
384
|
+
"slug": "biometrytype",
|
|
385
|
+
"members": [
|
|
386
|
+
{
|
|
387
|
+
"name": "NONE",
|
|
388
|
+
"tags": [],
|
|
389
|
+
"docs": ""
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
"name": "TOUCH_ID",
|
|
393
|
+
"tags": [],
|
|
394
|
+
"docs": ""
|
|
395
|
+
},
|
|
396
|
+
{
|
|
397
|
+
"name": "FACE_ID",
|
|
398
|
+
"tags": [],
|
|
399
|
+
"docs": ""
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
"name": "FINGERPRINT",
|
|
403
|
+
"tags": [],
|
|
404
|
+
"docs": ""
|
|
405
|
+
},
|
|
406
|
+
{
|
|
407
|
+
"name": "FACE_AUTHENTICATION",
|
|
408
|
+
"tags": [],
|
|
409
|
+
"docs": ""
|
|
410
|
+
},
|
|
411
|
+
{
|
|
412
|
+
"name": "IRIS_AUTHENTICATION",
|
|
413
|
+
"tags": [],
|
|
414
|
+
"docs": ""
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
"name": "MULTIPLE",
|
|
418
|
+
"tags": [],
|
|
419
|
+
"docs": ""
|
|
420
|
+
}
|
|
421
|
+
]
|
|
422
|
+
}
|
|
423
|
+
],
|
|
424
|
+
"typeAliases": [],
|
|
425
|
+
"pluginConfigs": []
|
|
426
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
export declare enum BiometryType {
|
|
2
|
+
NONE = 0,
|
|
3
|
+
TOUCH_ID = 1,
|
|
4
|
+
FACE_ID = 2,
|
|
5
|
+
FINGERPRINT = 3,
|
|
6
|
+
FACE_AUTHENTICATION = 4,
|
|
7
|
+
IRIS_AUTHENTICATION = 5,
|
|
8
|
+
MULTIPLE = 6
|
|
9
|
+
}
|
|
10
|
+
export interface Credentials {
|
|
11
|
+
username: string;
|
|
12
|
+
password: string;
|
|
13
|
+
}
|
|
14
|
+
export interface IsAvailableOptions {
|
|
15
|
+
/**
|
|
16
|
+
* Specifies if should fallback to passcode authentication if biometric authentication is not available.
|
|
17
|
+
*/
|
|
18
|
+
useFallback: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface AvailableResult {
|
|
21
|
+
isAvailable: boolean;
|
|
22
|
+
biometryType: BiometryType;
|
|
23
|
+
errorCode?: number;
|
|
24
|
+
}
|
|
25
|
+
export interface BiometricOptions {
|
|
26
|
+
reason?: string;
|
|
27
|
+
title?: string;
|
|
28
|
+
subtitle?: string;
|
|
29
|
+
description?: string;
|
|
30
|
+
negativeButtonText?: string;
|
|
31
|
+
useFallback?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Only for Android.
|
|
34
|
+
* Set a maximum number of attempts for biometric authentication. The maximum allowed by android is 5.
|
|
35
|
+
* @default 1
|
|
36
|
+
*/
|
|
37
|
+
maxAttempts?: number;
|
|
38
|
+
}
|
|
39
|
+
export interface GetCredentialOptions {
|
|
40
|
+
server: string;
|
|
41
|
+
}
|
|
42
|
+
export interface SetCredentialOptions {
|
|
43
|
+
username: string;
|
|
44
|
+
password: string;
|
|
45
|
+
server: string;
|
|
46
|
+
}
|
|
47
|
+
export interface DeleteCredentialOptions {
|
|
48
|
+
server: string;
|
|
49
|
+
}
|
|
50
|
+
export interface NativeBiometricPlugin {
|
|
51
|
+
/**
|
|
52
|
+
* Checks if biometric authentication hardware is available.
|
|
53
|
+
* @param {IsAvailableOptions} [options]
|
|
54
|
+
* @returns {Promise<AvailableResult>}
|
|
55
|
+
* @memberof NativeBiometricPlugin
|
|
56
|
+
* @since 1.0.0
|
|
57
|
+
*/
|
|
58
|
+
isAvailable(options?: IsAvailableOptions): Promise<AvailableResult>;
|
|
59
|
+
/**
|
|
60
|
+
* Prompts the user to authenticate with biometrics.
|
|
61
|
+
* @param {BiometricOptions} [options]
|
|
62
|
+
* @returns {Promise<any>}
|
|
63
|
+
* @memberof NativeBiometricPlugin
|
|
64
|
+
* @since 1.0.0
|
|
65
|
+
*/
|
|
66
|
+
verifyIdentity(options?: BiometricOptions): Promise<any>;
|
|
67
|
+
/**
|
|
68
|
+
* Gets the stored credentials for a given server.
|
|
69
|
+
* @param {GetCredentialOptions} options
|
|
70
|
+
* @returns {Promise<Credentials>}
|
|
71
|
+
* @memberof NativeBiometricPlugin
|
|
72
|
+
* @since 1.0.0
|
|
73
|
+
*/
|
|
74
|
+
getCredentials(options: GetCredentialOptions): Promise<Credentials>;
|
|
75
|
+
/**
|
|
76
|
+
* Stores the given credentials for a given server.
|
|
77
|
+
* @param {SetCredentialOptions} options
|
|
78
|
+
* @returns {Promise<any>}
|
|
79
|
+
* @memberof NativeBiometricPlugin
|
|
80
|
+
* @since 1.0.0
|
|
81
|
+
*/
|
|
82
|
+
setCredentials(options: SetCredentialOptions): Promise<any>;
|
|
83
|
+
/**
|
|
84
|
+
* Deletes the stored credentials for a given server.
|
|
85
|
+
* @param {DeleteCredentialOptions} options
|
|
86
|
+
* @returns {Promise<any>}
|
|
87
|
+
* @memberof NativeBiometricPlugin
|
|
88
|
+
* @since 1.0.0
|
|
89
|
+
*/
|
|
90
|
+
deleteCredentials(options: DeleteCredentialOptions): Promise<any>;
|
|
91
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export var BiometryType;
|
|
2
|
+
(function (BiometryType) {
|
|
3
|
+
BiometryType[BiometryType["NONE"] = 0] = "NONE";
|
|
4
|
+
BiometryType[BiometryType["TOUCH_ID"] = 1] = "TOUCH_ID";
|
|
5
|
+
BiometryType[BiometryType["FACE_ID"] = 2] = "FACE_ID";
|
|
6
|
+
BiometryType[BiometryType["FINGERPRINT"] = 3] = "FINGERPRINT";
|
|
7
|
+
BiometryType[BiometryType["FACE_AUTHENTICATION"] = 4] = "FACE_AUTHENTICATION";
|
|
8
|
+
BiometryType[BiometryType["IRIS_AUTHENTICATION"] = 5] = "IRIS_AUTHENTICATION";
|
|
9
|
+
BiometryType[BiometryType["MULTIPLE"] = 6] = "MULTIPLE";
|
|
10
|
+
})(BiometryType || (BiometryType = {}));
|
|
11
|
+
//# sourceMappingURL=definitions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,YAQX;AARD,WAAY,YAAY;IACtB,+CAAI,CAAA;IACJ,uDAAQ,CAAA;IACR,qDAAO,CAAA;IACP,6DAAW,CAAA;IACX,6EAAmB,CAAA;IACnB,6EAAmB,CAAA;IACnB,uDAAQ,CAAA;AACV,CAAC,EARW,YAAY,KAAZ,YAAY,QAQvB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { registerPlugin } from "@capacitor/core";
|
|
2
|
+
const NativeBiometric = registerPlugin("NativeBiometric", {
|
|
3
|
+
web: () => import("./web").then((m) => new m.NativeBiometricWeb()),
|
|
4
|
+
});
|
|
5
|
+
export * from "./definitions";
|
|
6
|
+
export { NativeBiometric };
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,eAAe,GAAG,cAAc,CACpC,iBAAiB,EACjB;IACE,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,kBAAkB,EAAE,CAAC;CACnE,CACF,CAAC;AAEF,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { WebPlugin } from "@capacitor/core";
|
|
2
|
+
import type { NativeBiometricPlugin, AvailableResult, BiometricOptions, GetCredentialOptions, SetCredentialOptions, DeleteCredentialOptions, Credentials } from "./definitions";
|
|
3
|
+
export declare class NativeBiometricWeb extends WebPlugin implements NativeBiometricPlugin {
|
|
4
|
+
constructor();
|
|
5
|
+
isAvailable(): Promise<AvailableResult>;
|
|
6
|
+
verifyIdentity(_options?: BiometricOptions): Promise<any>;
|
|
7
|
+
getCredentials(_options: GetCredentialOptions): Promise<Credentials>;
|
|
8
|
+
setCredentials(_options: SetCredentialOptions): Promise<any>;
|
|
9
|
+
deleteCredentials(_options: DeleteCredentialOptions): Promise<any>;
|
|
10
|
+
}
|
package/dist/esm/web.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { WebPlugin } from "@capacitor/core";
|
|
2
|
+
export class NativeBiometricWeb extends WebPlugin {
|
|
3
|
+
constructor() {
|
|
4
|
+
super();
|
|
5
|
+
}
|
|
6
|
+
isAvailable() {
|
|
7
|
+
throw new Error("Method not implemented.");
|
|
8
|
+
}
|
|
9
|
+
verifyIdentity(_options) {
|
|
10
|
+
throw new Error("Method not implemented.");
|
|
11
|
+
}
|
|
12
|
+
getCredentials(_options) {
|
|
13
|
+
throw new Error("Method not implemented.");
|
|
14
|
+
}
|
|
15
|
+
setCredentials(_options) {
|
|
16
|
+
throw new Error("Method not implemented.");
|
|
17
|
+
}
|
|
18
|
+
deleteCredentials(_options) {
|
|
19
|
+
throw new Error("Method not implemented.");
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=web.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAY5C,MAAM,OAAO,kBACX,SAAQ,SAAS;IAGjB;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IACD,WAAW;QACT,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IAED,cAAc,CAAC,QAA2B;QACxC,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IACD,cAAc,CAAC,QAA8B;QAC3C,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IACD,cAAc,CAAC,QAA8B;QAC3C,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IACD,iBAAiB,CAAC,QAAiC;QACjD,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;CACF"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var core = require('@capacitor/core');
|
|
4
|
+
|
|
5
|
+
exports.BiometryType = void 0;
|
|
6
|
+
(function (BiometryType) {
|
|
7
|
+
BiometryType[BiometryType["NONE"] = 0] = "NONE";
|
|
8
|
+
BiometryType[BiometryType["TOUCH_ID"] = 1] = "TOUCH_ID";
|
|
9
|
+
BiometryType[BiometryType["FACE_ID"] = 2] = "FACE_ID";
|
|
10
|
+
BiometryType[BiometryType["FINGERPRINT"] = 3] = "FINGERPRINT";
|
|
11
|
+
BiometryType[BiometryType["FACE_AUTHENTICATION"] = 4] = "FACE_AUTHENTICATION";
|
|
12
|
+
BiometryType[BiometryType["IRIS_AUTHENTICATION"] = 5] = "IRIS_AUTHENTICATION";
|
|
13
|
+
BiometryType[BiometryType["MULTIPLE"] = 6] = "MULTIPLE";
|
|
14
|
+
})(exports.BiometryType || (exports.BiometryType = {}));
|
|
15
|
+
|
|
16
|
+
const NativeBiometric = core.registerPlugin("NativeBiometric", {
|
|
17
|
+
web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.NativeBiometricWeb()),
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
class NativeBiometricWeb extends core.WebPlugin {
|
|
21
|
+
constructor() {
|
|
22
|
+
super();
|
|
23
|
+
}
|
|
24
|
+
isAvailable() {
|
|
25
|
+
throw new Error("Method not implemented.");
|
|
26
|
+
}
|
|
27
|
+
verifyIdentity(_options) {
|
|
28
|
+
throw new Error("Method not implemented.");
|
|
29
|
+
}
|
|
30
|
+
getCredentials(_options) {
|
|
31
|
+
throw new Error("Method not implemented.");
|
|
32
|
+
}
|
|
33
|
+
setCredentials(_options) {
|
|
34
|
+
throw new Error("Method not implemented.");
|
|
35
|
+
}
|
|
36
|
+
deleteCredentials(_options) {
|
|
37
|
+
throw new Error("Method not implemented.");
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
var web = /*#__PURE__*/Object.freeze({
|
|
42
|
+
__proto__: null,
|
|
43
|
+
NativeBiometricWeb: NativeBiometricWeb
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
exports.NativeBiometric = NativeBiometric;
|
|
47
|
+
//# sourceMappingURL=plugin.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.cjs.js","sources":["esm/definitions.js","esm/index.js","esm/web.js"],"sourcesContent":["export var BiometryType;\n(function (BiometryType) {\n BiometryType[BiometryType[\"NONE\"] = 0] = \"NONE\";\n BiometryType[BiometryType[\"TOUCH_ID\"] = 1] = \"TOUCH_ID\";\n BiometryType[BiometryType[\"FACE_ID\"] = 2] = \"FACE_ID\";\n BiometryType[BiometryType[\"FINGERPRINT\"] = 3] = \"FINGERPRINT\";\n BiometryType[BiometryType[\"FACE_AUTHENTICATION\"] = 4] = \"FACE_AUTHENTICATION\";\n BiometryType[BiometryType[\"IRIS_AUTHENTICATION\"] = 5] = \"IRIS_AUTHENTICATION\";\n BiometryType[BiometryType[\"MULTIPLE\"] = 6] = \"MULTIPLE\";\n})(BiometryType || (BiometryType = {}));\n//# sourceMappingURL=definitions.js.map","import { registerPlugin } from \"@capacitor/core\";\nconst NativeBiometric = registerPlugin(\"NativeBiometric\", {\n web: () => import(\"./web\").then((m) => new m.NativeBiometricWeb()),\n});\nexport * from \"./definitions\";\nexport { NativeBiometric };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from \"@capacitor/core\";\nexport class NativeBiometricWeb extends WebPlugin {\n constructor() {\n super();\n }\n isAvailable() {\n throw new Error(\"Method not implemented.\");\n }\n verifyIdentity(_options) {\n throw new Error(\"Method not implemented.\");\n }\n getCredentials(_options) {\n throw new Error(\"Method not implemented.\");\n }\n setCredentials(_options) {\n throw new Error(\"Method not implemented.\");\n }\n deleteCredentials(_options) {\n throw new Error(\"Method not implemented.\");\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["BiometryType","registerPlugin","WebPlugin"],"mappings":";;;;AAAWA,8BAAa;AACxB,CAAC,UAAU,YAAY,EAAE;AACzB,IAAI,YAAY,CAAC,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;AACpD,IAAI,YAAY,CAAC,YAAY,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU,CAAC;AAC5D,IAAI,YAAY,CAAC,YAAY,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,SAAS,CAAC;AAC1D,IAAI,YAAY,CAAC,YAAY,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,GAAG,aAAa,CAAC;AAClE,IAAI,YAAY,CAAC,YAAY,CAAC,qBAAqB,CAAC,GAAG,CAAC,CAAC,GAAG,qBAAqB,CAAC;AAClF,IAAI,YAAY,CAAC,YAAY,CAAC,qBAAqB,CAAC,GAAG,CAAC,CAAC,GAAG,qBAAqB,CAAC;AAClF,IAAI,YAAY,CAAC,YAAY,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU,CAAC;AAC5D,CAAC,EAAEA,oBAAY,KAAKA,oBAAY,GAAG,EAAE,CAAC,CAAC;;ACRlC,MAAC,eAAe,GAAGC,mBAAc,CAAC,iBAAiB,EAAE;AAC1D,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,kBAAkB,EAAE,CAAC;AACtE,CAAC;;ACFM,MAAM,kBAAkB,SAASC,cAAS,CAAC;AAClD,IAAI,WAAW,GAAG;AAClB,QAAQ,KAAK,EAAE,CAAC;AAChB,KAAK;AACL,IAAI,WAAW,GAAG;AAClB,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;AACnD,KAAK;AACL,IAAI,cAAc,CAAC,QAAQ,EAAE;AAC7B,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;AACnD,KAAK;AACL,IAAI,cAAc,CAAC,QAAQ,EAAE;AAC7B,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;AACnD,KAAK;AACL,IAAI,cAAc,CAAC,QAAQ,EAAE;AAC7B,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;AACnD,KAAK;AACL,IAAI,iBAAiB,CAAC,QAAQ,EAAE;AAChC,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;AACnD,KAAK;AACL;;;;;;;;;"}
|