@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 CHANGED
@@ -66,7 +66,7 @@ vcl.initialize(initializationDescriptor).then(
66
66
  );
67
67
  ```
68
68
 
69
- SDK `2.10.0-rc` uses native taxonomy error codes by default. To temporarily
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 = {
@@ -18,7 +18,7 @@ Pod::Spec.new do |s|
18
18
 
19
19
  s.swift_version = "5.0"
20
20
 
21
- s.dependency "VCL", "2.10.0-rc"
21
+ s.dependency "VCL", package["version"]
22
22
 
23
23
  install_modules_dependencies(s)
24
24
  end
@@ -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:2.10.0-rc"
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 = VCLJwt(encodedJwt: (credentialManifestDictionary?["jwt"] as? [String: Any])?["encodedJwt"] as? String ?? "")
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 VCLJwt(encodedJwt: jwtDictionary?["encodedJwt"] as? String ?? "")
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?] {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@velocitycareerlabs/vcl-react-native",
3
- "version": "2.10.0-rc",
3
+ "version": "2.10.0-rc.1",
4
4
  "description": "Velocity Career Labs React Native SDK",
5
5
  "license": "Apache-2.0",
6
6
  "publishConfig": {