@velocitycareerlabs/vcl-react-native 2.10.0-rc → 2.10.0-rc.1
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/README.md +1 -1
- package/VclReactNative.podspec +1 -1
- package/android/build.gradle +4 -1
- package/ios/Utils/Converter.swift +6 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -66,7 +66,7 @@ vcl.initialize(initializationDescriptor).then(
|
|
|
66
66
|
);
|
|
67
67
|
```
|
|
68
68
|
|
|
69
|
-
SDK `2.10.0
|
|
69
|
+
SDK `2.10.0` uses native taxonomy error codes by default. To temporarily
|
|
70
70
|
preserve legacy native error-code mappings during migration, initialize with:
|
|
71
71
|
```js
|
|
72
72
|
const initializationDescriptor: VCLInitializationDescriptor = {
|
package/VclReactNative.podspec
CHANGED
package/android/build.gradle
CHANGED
|
@@ -21,6 +21,9 @@ apply plugin: "kotlin-android"
|
|
|
21
21
|
|
|
22
22
|
apply plugin: "com.facebook.react"
|
|
23
23
|
|
|
24
|
+
def packageJson = new groovy.json.JsonSlurper().parse(file("$projectDir/../package.json"))
|
|
25
|
+
def vclSdkVersion = packageJson.version
|
|
26
|
+
|
|
24
27
|
def getExtOrIntegerDefault(name) {
|
|
25
28
|
return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties["VclReactNative_" + name]).toInteger()
|
|
26
29
|
}
|
|
@@ -76,7 +79,7 @@ dependencies {
|
|
|
76
79
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
77
80
|
|
|
78
81
|
//--------- Must: be added:
|
|
79
|
-
implementation "io.velocitycareerlabs:vcl
|
|
82
|
+
implementation "io.velocitycareerlabs:vcl:$vclSdkVersion"
|
|
80
83
|
implementation 'com.nimbusds:nimbus-jose-jwt:10.5'
|
|
81
84
|
implementation "androidx.security:security-crypto:1.1.0"
|
|
82
85
|
//-------------------------
|
|
@@ -504,7 +504,7 @@ func credentialManifestToDictionary(
|
|
|
504
504
|
func dictionaryToCredentialManifest(
|
|
505
505
|
_ credentialManifestDictionary: [String: Any]?
|
|
506
506
|
) -> VCLCredentialManifest {
|
|
507
|
-
let jwt =
|
|
507
|
+
let jwt = jwtFromEncodedJwt((credentialManifestDictionary?["jwt"] as? [String: Any])?["encodedJwt"] as? String ?? "")
|
|
508
508
|
let vendorOriginContext = credentialManifestDictionary?["vendorOriginContext"] as? String
|
|
509
509
|
let verifiedProfileDictionary = credentialManifestDictionary?["verifiedProfile"] as? [String: Any]
|
|
510
510
|
let deepLink = dictionaryToDeepLink(credentialManifestDictionary?["deepLink"] as? [String: Any])
|
|
@@ -591,7 +591,11 @@ func credentialTypesFormSchemaToDictionary(
|
|
|
591
591
|
func dictionaryToJwt(
|
|
592
592
|
_ jwtDictionary: [String: Any]?
|
|
593
593
|
) -> VCLJwt {
|
|
594
|
-
return
|
|
594
|
+
return jwtFromEncodedJwt(jwtDictionary?["encodedJwt"] as? String ?? "")
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
func jwtFromEncodedJwt(_ encodedJwt: String) -> VCLJwt {
|
|
598
|
+
return (try? VCLJwt(encodedJwt: encodedJwt)) ?? VCLJwt(header: nil, payload: nil, signature: nil, encodedJwt: encodedJwt)
|
|
595
599
|
}
|
|
596
600
|
|
|
597
601
|
func jwtToDictionary(_ jwt: VCLJwt) -> [String: Any?] {
|