mirror of
https://github.com/mosip/inji-wallet.git
synced 2026-01-09 13:38:01 -05:00
[INJIMOB-2091] update OpenID4VP swift library version (#1815)
* [INJIMOB-2091] update OpenID4VP swift library version Other changes: - Modify authenticateVerifier method call's labels as per library Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com> * [INJIMOB-2901] rename encodedAuthorizationRequest to urlEncodedAuthorizationRequest Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com> --------- Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com>
This commit is contained in:
committed by
GitHub
parent
0b20d82cfc
commit
5877a806df
@@ -50,11 +50,11 @@ public class InjiOpenID4VPModule extends ReactContextBaseJavaModule {
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void authenticateVerifier(String encodedAuthorizationRequest, ReadableArray trustedVerifiers,
|
||||
public void authenticateVerifier(String urlEncodedAuthorizationRequest, ReadableArray trustedVerifiers,
|
||||
Boolean shouldValidateClient,
|
||||
Promise promise) {
|
||||
try {
|
||||
AuthorizationRequest authenticationResponse = openID4VP.authenticateVerifier(encodedAuthorizationRequest,
|
||||
AuthorizationRequest authenticationResponse = openID4VP.authenticateVerifier(urlEncodedAuthorizationRequest,
|
||||
convertReadableArrayToVerifierArray(trustedVerifiers), shouldValidateClient);
|
||||
String authenticationResponseAsJson = gson.toJson(authenticationResponse, AuthorizationRequest.class);
|
||||
promise.resolve(authenticationResponseAsJson);
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
1E6875EB2CA554FD0086D870 /* RNOpenID4VPModule.m in Sources */ = {isa = PBXBuildFile; fileRef = 1E6875EA2CA554FD0086D870 /* RNOpenID4VPModule.m */; };
|
||||
1E6875ED2CA5550F0086D870 /* RNOpenID4VPModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E6875EC2CA5550F0086D870 /* RNOpenID4VPModule.swift */; };
|
||||
1EC395242D50C89C0022D979 /* VCIClient in Frameworks */ = {isa = PBXBuildFile; productRef = 1EC395232D50C89C0022D979 /* VCIClient */; };
|
||||
1EC395272D50C9150022D979 /* OpenID4VP in Frameworks */ = {isa = PBXBuildFile; productRef = 1EC395262D50C9150022D979 /* OpenID4VP */; };
|
||||
3403A56C2D6C79EB00AD64DE /* OpenID4VP in Frameworks */ = {isa = PBXBuildFile; productRef = 3403A56B2D6C79EB00AD64DE /* OpenID4VP */; };
|
||||
1EC3952A2D50C9470022D979 /* pixelpass in Frameworks */ = {isa = PBXBuildFile; productRef = 1EC395292D50C9470022D979 /* pixelpass */; };
|
||||
1EC3952D2D50C9820022D979 /* ios-tuvali-library in Frameworks */ = {isa = PBXBuildFile; productRef = 1EC3952C2D50C9820022D979 /* ios-tuvali-library */; };
|
||||
1EC395302D50C99E0022D979 /* securekeystore in Frameworks */ = {isa = PBXBuildFile; productRef = 1EC3952F2D50C99E0022D979 /* securekeystore */; };
|
||||
@@ -115,7 +115,7 @@
|
||||
files = (
|
||||
1EC395242D50C89C0022D979 /* VCIClient in Frameworks */,
|
||||
1EC3952A2D50C9470022D979 /* pixelpass in Frameworks */,
|
||||
1EC395272D50C9150022D979 /* OpenID4VP in Frameworks */,
|
||||
3403A56C2D6C79EB00AD64DE /* OpenID4VP in Frameworks */,
|
||||
1EC395302D50C99E0022D979 /* securekeystore in Frameworks */,
|
||||
96905EF65AED1B983A6B3ABC /* libPods-Inji.a in Frameworks */,
|
||||
1EC3952D2D50C9820022D979 /* ios-tuvali-library in Frameworks */,
|
||||
@@ -273,7 +273,7 @@
|
||||
1E55884F2CC0EF2C00CF55B4 /* Copy FaceSDK Model */,
|
||||
00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
|
||||
800E24972A6A228C8D4807E9 /* [CP] Copy Pods Resources */,
|
||||
D11A8C363B4A5B625DB10379 /* [CP] Embed Pods Frameworks */,
|
||||
0F2FCBA5E4517C72775B53F7 /* [CP] Embed Pods Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
@@ -282,7 +282,7 @@
|
||||
name = Inji;
|
||||
packageProductDependencies = (
|
||||
1EC395232D50C89C0022D979 /* VCIClient */,
|
||||
1EC395262D50C9150022D979 /* OpenID4VP */,
|
||||
3403A56B2D6C79EB00AD64DE /* OpenID4VP */,
|
||||
1EC395292D50C9470022D979 /* pixelpass */,
|
||||
1EC3952C2D50C9820022D979 /* ios-tuvali-library */,
|
||||
1EC3952F2D50C99E0022D979 /* securekeystore */,
|
||||
@@ -315,7 +315,7 @@
|
||||
mainGroup = 83CBB9F61A601CBA00E9B192;
|
||||
packageReferences = (
|
||||
1EC395222D50C89C0022D979 /* XCRemoteSwiftPackageReference "inji-vci-client-ios-swift.git" */,
|
||||
1EC395252D50C9150022D979 /* XCRemoteSwiftPackageReference "inji-openid4vp-ios-swift.git" */,
|
||||
3403A56A2D6C79EB00AD64DE /* XCRemoteSwiftPackageReference "inji-openid4vp-ios-swift.git" */,
|
||||
1EC395282D50C9470022D979 /* XCRemoteSwiftPackageReference "pixelpass-ios-swift.git" */,
|
||||
1EC3952B2D50C9820022D979 /* XCRemoteSwiftPackageReference "tuvali-ios-swift.git" */,
|
||||
1EC3952E2D50C99E0022D979 /* XCRemoteSwiftPackageReference "secure-keystore-ios-swift.git" */,
|
||||
@@ -471,24 +471,24 @@
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Inji/Pods-Inji-resources.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
D11A8C363B4A5B625DB10379 /* [CP] Embed Pods Frameworks */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-Inji/Pods-Inji-frameworks.sh",
|
||||
"${PODS_XCFRAMEWORKS_BUILD_DIR}/hermes-engine/Pre-built/hermes.framework/hermes",
|
||||
);
|
||||
name = "[CP] Embed Pods Frameworks";
|
||||
outputPaths = (
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/hermes.framework",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Inji/Pods-Inji-frameworks.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
0F2FCBA5E4517C72775B53F7 /* [CP] Embed Pods Frameworks */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-Inji/Pods-Inji-frameworks.sh",
|
||||
"${PODS_XCFRAMEWORKS_BUILD_DIR}/hermes-engine/Pre-built/hermes.framework/hermes",
|
||||
);
|
||||
name = "[CP] Embed Pods Frameworks";
|
||||
outputPaths = (
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/hermes.framework",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Inji/Pods-Inji-frameworks.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
FD10A7F022414F080027D42C /* Start Packager */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@@ -574,7 +574,6 @@
|
||||
PRODUCT_BUNDLE_IDENTIFIER = io.mosip.inji.wallet.mobileid;
|
||||
PRODUCT_NAME = Inji;
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 5.0;
|
||||
@@ -803,6 +802,14 @@
|
||||
kind = branch;
|
||||
};
|
||||
};
|
||||
3403A56A2D6C79EB00AD64DE /* XCRemoteSwiftPackageReference "inji-openid4vp-ios-swift" */ = {
|
||||
isa = XCRemoteSwiftPackageReference;
|
||||
repositoryURL = "https://github.com/mosip/inji-openid4vp-ios-swift";
|
||||
requirement = {
|
||||
branch = "release-0.2.x";
|
||||
kind = branch;
|
||||
};
|
||||
};
|
||||
/* End XCRemoteSwiftPackageReference section */
|
||||
|
||||
/* Begin XCSwiftPackageProductDependency section */
|
||||
@@ -811,11 +818,11 @@
|
||||
package = 1EC395222D50C89C0022D979 /* XCRemoteSwiftPackageReference "inji-vci-client-ios-swift.git" */;
|
||||
productName = VCIClient;
|
||||
};
|
||||
1EC395262D50C9150022D979 /* OpenID4VP */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
package = 1EC395252D50C9150022D979 /* XCRemoteSwiftPackageReference "inji-openid4vp-ios-swift.git" */;
|
||||
productName = OpenID4VP;
|
||||
};
|
||||
3403A56B2D6C79EB00AD64DE /* OpenID4VP */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
package = 3403A56A2D6C79EB00AD64DE /* XCRemoteSwiftPackageReference "inji-openid4vp-ios-swift" */;
|
||||
productName = OpenID4VP;
|
||||
};
|
||||
1EC395292D50C9470022D979 /* pixelpass */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
package = 1EC395282D50C9470022D979 /* XCRemoteSwiftPackageReference "pixelpass-ios-swift.git" */;
|
||||
|
||||
@@ -1,123 +0,0 @@
|
||||
{
|
||||
"originHash" : "178f6c7c607eeb08b99a4966015d08339500de64791888a2e79d6b7afae53659",
|
||||
"pins" : [
|
||||
{
|
||||
"identity" : "base45-swift",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/ehn-dcc-development/base45-swift",
|
||||
"state" : {
|
||||
"revision" : "c1db97d793d02a1c3d56d50a738c8fd8c34372f8",
|
||||
"version" : "1.1.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identity" : "crcswift",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/ivanesik/CrcSwift.git",
|
||||
"state" : {
|
||||
"revision" : "bb2fff7fb79815fad0528da71c9168d570bfc76c",
|
||||
"version" : "0.0.3"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identity" : "cryptoswift",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/krzyzanowskim/CryptoSwift.git",
|
||||
"state" : {
|
||||
"revision" : "729e01bc9b9dab466ac85f21fb9ee2bc1c61b258",
|
||||
"version" : "1.8.4"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identity" : "gzipswift",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/1024jp/GzipSwift",
|
||||
"state" : {
|
||||
"revision" : "7a7f17761c76a932662ab77028a4329f67d645a4",
|
||||
"version" : "5.2.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identity" : "inji-openid4vp-ios-swift",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/mosip/inji-openid4vp-ios-swift.git",
|
||||
"state" : {
|
||||
"branch" : "release-0.2.x",
|
||||
"revision" : "8c682e3c99a4091330bcdf1725a8a659ab79a7cc"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identity" : "inji-vci-client-ios-swift",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/mosip/inji-vci-client-ios-swift.git",
|
||||
"state" : {
|
||||
"branch" : "release-0.2.x",
|
||||
"revision" : "5fe56728106cffc8eff47e43437f288307c9d91b"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identity" : "jose-swift",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/beatt83/jose-swift.git",
|
||||
"state" : {
|
||||
"revision" : "57fe5a03c83feaf73a84b23c02e641f86482e313",
|
||||
"version" : "4.0.2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identity" : "pixelpass-ios-swift",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/mosip/pixelpass-ios-swift.git",
|
||||
"state" : {
|
||||
"branch" : "release-0.6.x",
|
||||
"revision" : "7111692893287015599e4e0297bcade6a5375527"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identity" : "secp256k1.swift",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/GigaBitcoin/secp256k1.swift.git",
|
||||
"state" : {
|
||||
"revision" : "4c77c7384768acf1093d66ccaacf298d322b10b7",
|
||||
"version" : "0.15.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identity" : "secure-keystore-ios-swift",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/mosip/secure-keystore-ios-swift.git",
|
||||
"state" : {
|
||||
"branch" : "release-0.3.x",
|
||||
"revision" : "1ea5182ca985302d11010b7a16ea496167969ab3"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identity" : "swiftcbor",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/valpackett/SwiftCBOR",
|
||||
"state" : {
|
||||
"branch" : "master",
|
||||
"revision" : "ec24382864e5ffc6d3915c0818745d5ab12545a8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identity" : "tuvali-ios-swift",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/mosip/tuvali-ios-swift.git",
|
||||
"state" : {
|
||||
"branch" : "release-0.5.x",
|
||||
"revision" : "2d49e123f70dfc2179983a753d370cc2212385db"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identity" : "zipfoundation",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/weichsel/ZIPFoundation.git",
|
||||
"state" : {
|
||||
"revision" : "02b6abe5f6eef7e3cbd5f247c5cc24e246efcfe0",
|
||||
"version" : "0.9.19"
|
||||
}
|
||||
}
|
||||
],
|
||||
"version" : 2
|
||||
}
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
RCT_EXTERN_METHOD(init:(NSString *)appId)
|
||||
|
||||
RCT_EXTERN_METHOD(authenticateVerifier:(NSString *)encodedAuthorizationRequest
|
||||
RCT_EXTERN_METHOD(authenticateVerifier:(NSString *)urlEncodedAuthorizationRequest
|
||||
trustedVerifierJSON:(id)trustedVerifierJSON
|
||||
shouldValidateClient:(BOOL)shouldValidateClient
|
||||
resolver:(RCTPromiseResolveBlock)resolve
|
||||
|
||||
@@ -17,7 +17,7 @@ class RNOpenId4VpModule: NSObject, RCTBridgeModule {
|
||||
}
|
||||
|
||||
@objc
|
||||
func authenticateVerifier(_ encodedAuthorizationRequest: String,
|
||||
func authenticateVerifier(_ urlEncodedAuthorizationRequest: String,
|
||||
trustedVerifierJSON: AnyObject,
|
||||
shouldValidateClient: Bool,
|
||||
resolver resolve: @escaping RCTPromiseResolveBlock,
|
||||
@@ -37,7 +37,7 @@ class RNOpenId4VpModule: NSObject, RCTBridgeModule {
|
||||
return Verifier(clientId: clientId, responseUris: responseUris)
|
||||
}
|
||||
|
||||
let authenticationResponse: AuthorizationRequest = try await openID4VP!.authenticateVerifier(encodedAuthorizationRequest: encodedAuthorizationRequest, trustedVerifierJSON: trustedVerifiersList, shouldValidateClient: shouldValidateClient)
|
||||
let authenticationResponse: AuthorizationRequest = try await openID4VP!.authenticateVerifier(urlEncodedAuthorizationRequest: urlEncodedAuthorizationRequest, trustedVerifierJSON: trustedVerifiersList, shouldValidateClient: shouldValidateClient)
|
||||
|
||||
let response = try toJsonString(jsonObject: authenticationResponse)
|
||||
resolve(response)
|
||||
|
||||
@@ -20,8 +20,8 @@ export const openID4VPActions = (model: any) => {
|
||||
authenticationResponse: (_, event) => event.data,
|
||||
}),
|
||||
|
||||
setEncodedAuthorizationRequest: model.assign({
|
||||
encodedAuthorizationRequest: (_, event) => event.encodedAuthRequest,
|
||||
setUrlEncodedAuthorizationRequest: model.assign({
|
||||
urlEncodedAuthorizationRequest: (_, event) => event.encodedAuthRequest,
|
||||
}),
|
||||
|
||||
setFlowType: model.assign({
|
||||
|
||||
@@ -42,7 +42,7 @@ export const openID4VPMachine = model.createMachine(
|
||||
on: {
|
||||
AUTHENTICATE: {
|
||||
actions: [
|
||||
'setEncodedAuthorizationRequest',
|
||||
'setUrlEncodedAuthorizationRequest',
|
||||
'setFlowType',
|
||||
'setMiniViewShareSelectedVC',
|
||||
'setIsShareWithSelfie',
|
||||
|
||||
@@ -46,7 +46,7 @@ const openID4VPEvents = {
|
||||
export const openID4VPModel = createModel(
|
||||
{
|
||||
serviceRefs: {} as AppServices,
|
||||
encodedAuthorizationRequest: '' as string,
|
||||
urlEncodedAuthorizationRequest: '' as string,
|
||||
authenticationResponse: {},
|
||||
vcsMatchingAuthRequest: {} as Record<string, VC[]>,
|
||||
checkedAll: false as boolean,
|
||||
|
||||
@@ -23,7 +23,7 @@ export const openID4VPServices = () => {
|
||||
getAuthenticationResponse: (context: any) => async () => {
|
||||
OpenID4VP.initialize();
|
||||
const serviceRes = await OpenID4VP.authenticateVerifier(
|
||||
context.encodedAuthorizationRequest,
|
||||
context.urlEncodedAuthorizationRequest,
|
||||
context.trustedVerifiers,
|
||||
);
|
||||
return serviceRes;
|
||||
|
||||
@@ -18,14 +18,13 @@ export class OpenID4VP {
|
||||
}
|
||||
|
||||
static async authenticateVerifier(
|
||||
encodedAuthorizationRequest: string,
|
||||
urlEncodedAuthorizationRequest: string,
|
||||
trustedVerifiersList: any,
|
||||
) {
|
||||
const shouldValidateClient = await isClientValidationRequired();
|
||||
|
||||
const authenticationResponse =
|
||||
await OpenID4VP.InjiOpenID4VP.authenticateVerifier(
|
||||
encodedAuthorizationRequest,
|
||||
urlEncodedAuthorizationRequest,
|
||||
trustedVerifiersList,
|
||||
shouldValidateClient,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user