@humansecurity/expo-mobile-sdk 1.0.3 → 1.0.4
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/android/build.gradle
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
apply plugin: 'com.android.library'
|
|
2
2
|
|
|
3
3
|
group = 'expo.modules.humansdk'
|
|
4
|
-
version = '1.0.
|
|
4
|
+
version = '1.0.4'
|
|
5
5
|
|
|
6
6
|
def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
|
|
7
7
|
apply from: expoModulesCorePlugin
|
|
@@ -44,8 +44,8 @@ dependencies {
|
|
|
44
44
|
android {
|
|
45
45
|
namespace "expo.modules.humansdk"
|
|
46
46
|
defaultConfig {
|
|
47
|
-
versionCode
|
|
48
|
-
versionName "1.0.
|
|
47
|
+
versionCode 4
|
|
48
|
+
versionName "1.0.4"
|
|
49
49
|
}
|
|
50
50
|
lintOptions {
|
|
51
51
|
abortOnError false
|
|
@@ -51,17 +51,17 @@ class ExpoHumanSdkModule : Module() {
|
|
|
51
51
|
HumanSecurity.BD.headersForURLRequest(appId)
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
AsyncFunction("handleResponse") { response: String,
|
|
54
|
+
AsyncFunction("handleResponse") { response: String, _: Int, _: String, promise: Promise ->
|
|
55
55
|
val handled = HumanSecurity.BD.handleResponse(response) { result ->
|
|
56
56
|
promise.resolve(result.ordinal) // Return the raw ordinal value
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
if (!handled) {
|
|
60
|
-
promise.resolve(2)
|
|
60
|
+
promise.resolve(2) // This is for Failed case.
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
Function("canHandleResponse") { response: String,
|
|
64
|
+
Function("canHandleResponse") { response: String, _: Int, _: String ->
|
|
65
65
|
HumanSecurity.BD.canHandleResponse(response)
|
|
66
66
|
}
|
|
67
67
|
|
|
@@ -112,8 +112,11 @@ class ExpoHumanSdkModule : Module() {
|
|
|
112
112
|
policy.automaticInterceptorPolicy.interceptorType = HSAutomaticInterceptorType.NONE
|
|
113
113
|
policy.hybridAppPolicy.supportExternalWebViews = true
|
|
114
114
|
|
|
115
|
-
policyMap?.let {
|
|
116
|
-
val
|
|
115
|
+
policyMap?.let { map ->
|
|
116
|
+
val hybridPolicyMap = map["hybridAppPolicy"] as? Map<*, *>
|
|
117
|
+
val webRootDomainsMap = hybridPolicyMap?.get("webRootDomains") as? Map<*, *>
|
|
118
|
+
|
|
119
|
+
val hybridPolicy = webRootDomainsMap?.entries?.mapNotNull { entry ->
|
|
117
120
|
val key = entry.key as? String
|
|
118
121
|
val value = (entry.value as? List<*>)?.filterIsInstance<String>()
|
|
119
122
|
if (key != null && value != null) key to value else null
|
|
@@ -124,7 +127,7 @@ class ExpoHumanSdkModule : Module() {
|
|
|
124
127
|
policy.hybridAppPolicy.setWebRootDomains(domainSet, appId)
|
|
125
128
|
}
|
|
126
129
|
|
|
127
|
-
val detectionPolicy = (
|
|
130
|
+
val detectionPolicy = (map["detectionPolicy"] as? Map<*, *>)?.mapNotNull { entry ->
|
|
128
131
|
val key = entry.key as? String
|
|
129
132
|
val value = entry.value
|
|
130
133
|
if (key != null) key to value else null
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@humansecurity/expo-mobile-sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "An Expo module to wrap human native SDK for expo users.",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
"open:android": "open -a \"Android Studio\" example/android"
|
|
17
17
|
},
|
|
18
18
|
"keywords": [
|
|
19
|
-
"react-native",
|
|
20
19
|
"expo",
|
|
21
20
|
"expo-mobile-sdk",
|
|
22
|
-
"HumanSecurity"
|
|
21
|
+
"HumanSecurity",
|
|
22
|
+
"react-native"
|
|
23
23
|
],
|
|
24
24
|
"author": "",
|
|
25
25
|
"license": "MIT",
|