@velocitycareerlabs/vcl-react-native 1.1.7 → 1.1.10

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.
@@ -131,5 +131,5 @@ dependencies {
131
131
 
132
132
  // VCL:
133
133
  implementation "com.nimbusds:nimbus-jose-jwt:9.25.6"
134
- implementation "io.velocitycareerlabs:vcl:1.1.7"
134
+ implementation "io.velocitycareerlabs:vcl:1.1.10"
135
135
  }
@@ -298,7 +298,11 @@ class VclReactNativeModule(private val reactContext: ReactApplicationContext) :
298
298
  }
299
299
 
300
300
  @ReactMethod
301
- fun verifyJwt(jwtMap: ReadableMap, publicKeyMap: ReadableMap, promise: Promise) {
301
+ fun verifyJwt(
302
+ jwtMap: ReadableMap,
303
+ publicKeyMap: ReadableMap,
304
+ promise: Promise
305
+ ) {
302
306
  try {
303
307
  vcl.verifyJwt(mapToJwt(jwtMap), mapToPublicKey(publicKeyMap),
304
308
  {
@@ -313,11 +317,16 @@ class VclReactNativeModule(private val reactContext: ReactApplicationContext) :
313
317
  }
314
318
 
315
319
  @ReactMethod
316
- fun generateSignedJwt(jwtJsonMap: ReadableMap, iss: String, promise: Promise) {
320
+ fun generateSignedJwt(
321
+ jwtJsonMap: ReadableMap,
322
+ iss: String,
323
+ jti: String,
324
+ promise: Promise
325
+ ) {
317
326
  var json: JSONObject? = null
318
327
  try {
319
328
  json = JSONObject(jwtJsonMap.toHashMap())
320
- vcl.generateSignedJwt(json, iss,
329
+ vcl.generateSignedJwt(json, iss, jti,
321
330
  {
322
331
  promise.resolve(Converter.jwtToMap(it))
323
332
  },
@@ -70,6 +70,7 @@ RCT_EXTERN_METHOD(verifyJwt:(NSDictionary*)jwtDictionary
70
70
 
71
71
  RCT_EXTERN_METHOD(generateSignedJwt:(NSDictionary*)jwtDictionary
72
72
  withIss:(NSString*)iss
73
+ withJti:(NSString*)jti
73
74
  withResolver:(RCTPromiseResolveBlock)resolve
74
75
  withRejecter:(RCTPromiseRejectBlock)reject)
75
76
 
@@ -239,15 +239,17 @@ class VclReactNative: NSObject {
239
239
  })
240
240
  }
241
241
 
242
- @objc(generateSignedJwt:withIss:withResolver:withRejecter:)
242
+ @objc(generateSignedJwt:withIss:withJti:withResolver:withRejecter:)
243
243
  func generateSignedJwt(
244
244
  jwtDictionary: [String: Any],
245
245
  iss: String,
246
+ jti: String,
246
247
  resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock
247
248
  ) {
248
249
  vcl.generateSignedJwt(
249
250
  payload: jwtDictionary,
250
251
  iss: iss,
252
+ jti: jti,
251
253
  successHandler: {
252
254
  resolve(jwtToReadableMap($0))
253
255
  },
@@ -46,5 +46,5 @@ export declare type VclApi = {
46
46
  getCredentialTypesUIFormSchema(credentialTypesUIFormSchemaDescriptor: VCLCredentialTypesUIFormSchemaDescriptor): Promise<VCLCredentialTypesUIFormSchema>;
47
47
  getVerifiedProfile(verifiedProfileDescriptor: VCLVerifiedProfileDescriptor): Promise<VCLVerifiedProfile>;
48
48
  verifyJwt(jwt: VCLJWT, publicKey: VCLPublicKey): Promise<boolean>;
49
- generateSignedJwt(payload: Dictionary<any>, iss: string): Promise<VCLJWT>;
49
+ generateSignedJwt(payload: Dictionary<any>, iss: string, jti: string): Promise<VCLJWT>;
50
50
  };
@@ -7,5 +7,5 @@
7
7
  import type { VCLEnvironment } from '../VCLEnvironment';
8
8
  export interface VCLInitializationDescriptor {
9
9
  environment?: VCLEnvironment;
10
- cacheSequence?: Number;
10
+ cacheSequence?: number;
11
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@velocitycareerlabs/vcl-react-native",
3
- "version": "1.1.7",
3
+ "version": "1.1.10",
4
4
  "description": "Velocity Career Labs React Native SDK",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
package/src/api/VCLApi.ts CHANGED
@@ -85,5 +85,9 @@ export type VclApi = {
85
85
 
86
86
  verifyJwt(jwt: VCLJWT, publicKey: VCLPublicKey): Promise<boolean>;
87
87
 
88
- generateSignedJwt(payload: Dictionary<any>, iss: string): Promise<VCLJWT>;
88
+ generateSignedJwt(
89
+ payload: Dictionary<any>,
90
+ iss: string,
91
+ jti: string
92
+ ): Promise<VCLJWT>;
89
93
  };
@@ -9,5 +9,5 @@ import type { VCLEnvironment } from '../VCLEnvironment';
9
9
 
10
10
  export interface VCLInitializationDescriptor {
11
11
  environment?: VCLEnvironment;
12
- cacheSequence?: Number;
12
+ cacheSequence?: number;
13
13
  }
@@ -18,5 +18,5 @@ Pod::Spec.new do |s|
18
18
  s.swift_version = "5.0"
19
19
 
20
20
  s.dependency "React"
21
- s.dependency "VCL", "1.1.7"
21
+ s.dependency "VCL", "1.1.10"
22
22
  end