@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.
- package/android/build.gradle +1 -1
- package/android/src/main/java/io/velocitycareerlabs/reactnative/VclReactNativeModule.kt +12 -3
- package/ios/VclReactNative.m +1 -0
- package/ios/VclReactNative.swift +3 -1
- package/lib/typescript/api/VCLApi.d.ts +1 -1
- package/lib/typescript/api/entities/VCLInitializationDescriptor.d.ts +1 -1
- package/package.json +1 -1
- package/src/api/VCLApi.ts +5 -1
- package/src/api/entities/VCLInitializationDescriptor.ts +1 -1
- package/vcl-react-native.podspec +1 -1
package/android/build.gradle
CHANGED
|
@@ -298,7 +298,11 @@ class VclReactNativeModule(private val reactContext: ReactApplicationContext) :
|
|
|
298
298
|
}
|
|
299
299
|
|
|
300
300
|
@ReactMethod
|
|
301
|
-
fun verifyJwt(
|
|
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(
|
|
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
|
},
|
package/ios/VclReactNative.m
CHANGED
|
@@ -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
|
|
package/ios/VclReactNative.swift
CHANGED
|
@@ -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
|
};
|
package/package.json
CHANGED
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(
|
|
88
|
+
generateSignedJwt(
|
|
89
|
+
payload: Dictionary<any>,
|
|
90
|
+
iss: string,
|
|
91
|
+
jti: string
|
|
92
|
+
): Promise<VCLJWT>;
|
|
89
93
|
};
|
package/vcl-react-native.podspec
CHANGED