mirror of
https://github.com/mosip/inji-wallet.git
synced 2026-01-09 13:38:01 -05:00
[INJIMOB-3390] refactor: update OVP wrapper as per library contract change (#2022)
* [INJIMOB-3390] refactor: update WalletMetadat's vpFormatsSupported - [VPFormatType: VPFormatSupported] Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com> * [INJIMOB-3390] fix: fallback metadata to support presentation_definition_uri Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com> * [INJIMOB-3390] refactor: rename fallbackWalletMetadata -> walletMetadata Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com> * [INJIMOB-3390] add: pass responseTYpesSupported to OVP walletMetadata Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com> * [INJIMOB-3388]: update the bridge code to add new parameters for walletmetadata Signed-off-by: Alka <prasadalka1998@gmail.com> * [INJIMOB-3390]: Resolve latest develop from swift library Signed-off-by: balachandarg-tw <balachandar.g@thoughtworks.com> * [INJIMOB-3388]: remove logging Signed-off-by: Alka <prasadalka1998@gmail.com> * [INJIMOB-3418]:content update in the TrustScreen of Credential Offer Signed-off-by: Alka <prasadalka1998@gmail.com> * [INJIMOB-3390]: Update issuerHost in VcMetadata Signed-off-by: balachandarg-tw <balachandar.g@thoughtworks.com> * [INJIMOB-3390]: Update condition in VCMetadata Signed-off-by: balachandarg-tw <balachandar.g@thoughtworks.com> * [INJIMOB-3390]: Update OVP library swift to point release-0.4.x Signed-off-by: balachandarg-tw <balachandar.g@thoughtworks.com> --------- Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com> Signed-off-by: Alka <prasadalka1998@gmail.com> Signed-off-by: balachandarg-tw <balachandar.g@thoughtworks.com> Co-authored-by: Alka <prasadalka1998@gmail.com> Co-authored-by: balachandarg-tw <balachandar.g@thoughtworks.com>
This commit is contained in:
committed by
GitHub
parent
5305e7d7ea
commit
798bf1944f
@@ -341,7 +341,7 @@ fileignoreconfig:
|
||||
- filename: android/app/src/main/java/io/mosip/residentapp/InjiVciClientModule.java
|
||||
checksum: 17f55840bab193bc353034445ba4fce53e1ce466e95f616c15a1351f8d2f23bc
|
||||
- filename: ios/Inji.xcworkspace/xcshareddata/swiftpm/Package.resolved
|
||||
checksum: 81d8398a4f4b052c3fb10d92f0e0af398d09095d9f882cc35335c43630c6c371
|
||||
checksum: b137863e4c1f6def6b0a855affecd25309d9388126203ec01e77950557629b12
|
||||
- filename: injitest/src/main/resources/Vids.json
|
||||
checksum: 8bcffed7a6dd565ae695e1b29de0655e10bd5c5420af2718defd593a687b8817
|
||||
- filename: injitest/src/main/java/inji/utils/UpdateNetworkSettings.java
|
||||
@@ -365,7 +365,7 @@ fileignoreconfig:
|
||||
- filename: android/app/src/main/AndroidManifest.xml
|
||||
checksum: 8f4bd61770b8bb0a28859ca0f3b4b095aed4e3fb5adef435cb74b9389ff13e09
|
||||
- filename: ios/Inji.xcodeproj/project.pbxproj
|
||||
checksum: 6e83472f832f71f75aa82ed06eb677d865195755074144e4bf832d6adb30e959
|
||||
checksum: 5fd66dc8d95628ae831e86caffb46bc0ecf0f42a534ebad76774ba133b8a7907
|
||||
- filename: screens/Settings/ReceivedCardsModal.tsx
|
||||
checksum: 6dee9153a61009b0252d294154c88d5e1b241a517c76e930b391a39d7bc52392
|
||||
- filename: components/FaceScanner/FaceCompare.tsx
|
||||
|
||||
@@ -22,9 +22,11 @@ import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
|
||||
import io.mosip.openID4VP.constants.ClientIdScheme;
|
||||
import io.mosip.openID4VP.constants.ContentEncrytionAlgorithm;
|
||||
import io.mosip.openID4VP.constants.ContentEncryptionAlgorithm;
|
||||
import io.mosip.openID4VP.constants.KeyManagementAlgorithm;
|
||||
import io.mosip.openID4VP.constants.RequestSigningAlgorithm;
|
||||
import io.mosip.openID4VP.constants.ResponseType;
|
||||
import io.mosip.openID4VP.constants.VPFormatType;
|
||||
import io.mosip.openID4VP.exceptions.OpenID4VPExceptions;
|
||||
|
||||
import static io.mosip.openID4VP.common.OpenID4VPErrorCodes.ACCESS_DENIED;
|
||||
@@ -159,23 +161,21 @@ public class InjiOpenID4VPModule extends ReactContextBaseJavaModule {
|
||||
? walletMetadata.getBoolean("presentation_definition_uri_supported")
|
||||
: null;
|
||||
|
||||
Map<FormatType, VPFormatSupported> vpFormatsSupportedMap = parseVpFormatsSupported(walletMetadata);
|
||||
Map<VPFormatType, VPFormatSupported> vpFormatsSupportedMap = parseVpFormatsSupported(walletMetadata);
|
||||
|
||||
ContentEncrytionAlgorithm algorithm = ContentEncrytionAlgorithm.Companion.fromValue("value");
|
||||
WalletMetadata walletMetadata1 = new WalletMetadata(
|
||||
return new WalletMetadata(
|
||||
presentationDefinitionUriSupported,
|
||||
vpFormatsSupportedMap,
|
||||
convertReadableArrayToEnumList(walletMetadata, "client_id_schemes_supported", ClientIdScheme.Companion::fromValue),
|
||||
convertReadableArrayToEnumList(walletMetadata, "request_object_signing_alg_values_supported", RequestSigningAlgorithm.Companion::fromValue),
|
||||
convertReadableArrayToEnumList(walletMetadata, "authorization_encryption_alg_values_supported", KeyManagementAlgorithm.Companion::fromValue),
|
||||
convertReadableArrayToEnumList(walletMetadata, "authorization_encryption_enc_values_supported", ContentEncrytionAlgorithm.Companion::fromValue)
|
||||
convertReadableArrayToEnumList(walletMetadata, "authorization_encryption_enc_values_supported", ContentEncryptionAlgorithm.Companion::fromValue),
|
||||
convertReadableArrayToEnumList(walletMetadata, "response_type_supported", ResponseType.Companion::fromValue)
|
||||
);
|
||||
System.out.println("Wallet Metadata: " + walletMetadata1);
|
||||
return walletMetadata1;
|
||||
}
|
||||
|
||||
private Map<FormatType, VPFormatSupported> parseVpFormatsSupported(ReadableMap walletMetadata) {
|
||||
Map<FormatType, VPFormatSupported> vpFormatsSupportedMap = new HashMap<>();
|
||||
private Map<VPFormatType, VPFormatSupported> parseVpFormatsSupported(ReadableMap walletMetadata) {
|
||||
Map<VPFormatType, VPFormatSupported> vpFormatsSupportedMap = new HashMap<>();
|
||||
if (walletMetadata.hasKey("vp_formats_supported")) {
|
||||
ReadableMap vpFormatsMap = walletMetadata.getMap("vp_formats_supported");
|
||||
if (vpFormatsMap != null) {
|
||||
@@ -197,14 +197,13 @@ public class InjiOpenID4VPModule extends ReactContextBaseJavaModule {
|
||||
}
|
||||
|
||||
|
||||
private void addVpFormatSupported(ReadableMap vpFormatsMap, String key, Map<FormatType, VPFormatSupported> vpFormatsSupportedMap) {
|
||||
private void addVpFormatSupported(ReadableMap vpFormatsMap, String key, Map<VPFormatType, VPFormatSupported> vpFormatsSupportedMap) {
|
||||
if (vpFormatsMap.hasKey(key)) {
|
||||
ReadableMap formatMap = vpFormatsMap.getMap(key);
|
||||
if (formatMap != null && formatMap.hasKey("alg_values_supported")) {
|
||||
ReadableArray algArray = formatMap.getArray("alg_values_supported");
|
||||
List<String> algValuesList = algArray != null ? convertReadableArrayToList(algArray) : null;
|
||||
|
||||
vpFormatsSupportedMap.put(FormatType.Companion.fromValue(key), new VPFormatSupported(algValuesList));
|
||||
vpFormatsSupportedMap.put(VPFormatType.Companion.fromValue(key), new VPFormatSupported(algValuesList));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -212,7 +211,7 @@ public class InjiOpenID4VPModule extends ReactContextBaseJavaModule {
|
||||
|
||||
|
||||
private List<Verifier> parseVerifiers(ReadableArray verifiersArray) {
|
||||
List<Verifier> verifiers = new ArrayList<>();
|
||||
List<Verifier> verifiers = new ArrayList();
|
||||
|
||||
for (int i = 0; i < verifiersArray.size(); i++) {
|
||||
ReadableMap verifierMap = verifiersArray.getMap(i);
|
||||
|
||||
@@ -672,8 +672,8 @@ export const DefaultTheme = {
|
||||
},
|
||||
introSliderHeader: {
|
||||
marginTop: isIOS()
|
||||
? Constants.statusBarHeight + 40
|
||||
: StatusBar.currentHeight + 40,
|
||||
? Constants.statusBarHeight + 40
|
||||
: StatusBar.currentHeight + 40,
|
||||
width: '100%',
|
||||
marginBottom: 50,
|
||||
},
|
||||
@@ -2005,6 +2005,7 @@ export const DefaultTheme = {
|
||||
backgroundColor: '#fff',
|
||||
borderRadius: 20,
|
||||
width: '100%',
|
||||
height: 470,
|
||||
padding: 20,
|
||||
alignItems: 'center',
|
||||
},
|
||||
@@ -2028,31 +2029,57 @@ export const DefaultTheme = {
|
||||
color: '#666',
|
||||
textAlign: 'center',
|
||||
lineHeight: 20,
|
||||
marginBottom: 24,
|
||||
marginBottom: 16,
|
||||
},
|
||||
infoContainer: {
|
||||
width: '100%',
|
||||
marginBottom: 10,
|
||||
},
|
||||
infoItem: {
|
||||
flexDirection: 'row',
|
||||
alignItems: 'flex-start',
|
||||
marginBottom: 6,
|
||||
paddingHorizontal: 4,
|
||||
},
|
||||
info: {
|
||||
fontSize: 14,
|
||||
color: '#666',
|
||||
marginRight: 8,
|
||||
marginTop: 1,
|
||||
},
|
||||
infoText: {
|
||||
flex: 1,
|
||||
fontSize: 14,
|
||||
color: '#666',
|
||||
lineHeight: 18,
|
||||
},
|
||||
buttonText: {
|
||||
textAlign: 'center',
|
||||
flexWrap: 'wrap',
|
||||
},
|
||||
}),
|
||||
|
||||
AuthWebViewScreenStyle: StyleSheet.create({
|
||||
header: {
|
||||
height: 56,
|
||||
paddingHorizontal: 16,
|
||||
flexDirection: 'row',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'space-between',
|
||||
backgroundColor: '#F5F5F5',
|
||||
borderBottomWidth: 1,
|
||||
borderColor: '#E0E0E0',
|
||||
height: 56,
|
||||
paddingHorizontal: 16,
|
||||
flexDirection: 'row',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'space-between',
|
||||
backgroundColor: '#F5F5F5',
|
||||
borderBottomWidth: 1,
|
||||
borderColor: '#E0E0E0',
|
||||
},
|
||||
headerText: {
|
||||
fontSize: 18,
|
||||
fontWeight: '500',
|
||||
fontSize: 18,
|
||||
fontWeight: '500',
|
||||
},
|
||||
loader: {
|
||||
flex: 1,
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
flex: 1,
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
},
|
||||
}),
|
||||
}),
|
||||
|
||||
ICON_SMALL_SIZE: 16,
|
||||
ICON_MID_SIZE: 22,
|
||||
@@ -2093,7 +2120,7 @@ export const DefaultTheme = {
|
||||
}
|
||||
|
||||
const [top, end, bottom, start] =
|
||||
typeof values === 'string' ? values.split(' ').map(Number) : values;
|
||||
typeof values === 'string' ? values.split(' ').map(Number) : values;
|
||||
|
||||
return {
|
||||
[`${type}Top`]: top,
|
||||
@@ -2121,4 +2148,4 @@ function generateBoxShadowStyle() {
|
||||
elevation: 4,
|
||||
shadowColor: '#000',
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -678,8 +678,8 @@ export const PurpleTheme = {
|
||||
},
|
||||
introSliderHeader: {
|
||||
marginTop: isIOS()
|
||||
? Constants.statusBarHeight + 40
|
||||
: StatusBar.currentHeight + 40,
|
||||
? Constants.statusBarHeight + 40
|
||||
: StatusBar.currentHeight + 40,
|
||||
width: '100%',
|
||||
marginBottom: 50,
|
||||
},
|
||||
@@ -2007,6 +2007,7 @@ export const PurpleTheme = {
|
||||
backgroundColor: '#fff',
|
||||
borderRadius: 20,
|
||||
width: '100%',
|
||||
height: 470,
|
||||
padding: 20,
|
||||
alignItems: 'center',
|
||||
},
|
||||
@@ -2030,31 +2031,57 @@ export const PurpleTheme = {
|
||||
color: '#666',
|
||||
textAlign: 'center',
|
||||
lineHeight: 20,
|
||||
marginBottom: 24,
|
||||
marginBottom: 16,
|
||||
},
|
||||
infoContainer: {
|
||||
width: '100%',
|
||||
marginBottom: 10,
|
||||
},
|
||||
infoItem: {
|
||||
flexDirection: 'row',
|
||||
alignItems: 'flex-start',
|
||||
marginBottom: 6,
|
||||
paddingHorizontal: 4,
|
||||
},
|
||||
info: {
|
||||
fontSize: 14,
|
||||
color: '#666',
|
||||
marginRight: 8,
|
||||
marginTop: 1,
|
||||
},
|
||||
infoText: {
|
||||
flex: 1,
|
||||
fontSize: 14,
|
||||
color: '#666',
|
||||
lineHeight: 18,
|
||||
},
|
||||
buttonText: {
|
||||
textAlign: 'center',
|
||||
flexWrap: 'wrap',
|
||||
},
|
||||
}),
|
||||
|
||||
AuthWebViewScreenStyle: StyleSheet.create({
|
||||
header: {
|
||||
height: 56,
|
||||
paddingHorizontal: 16,
|
||||
flexDirection: 'row',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'space-between',
|
||||
backgroundColor: '#F5F5F5',
|
||||
borderBottomWidth: 1,
|
||||
borderColor: '#E0E0E0',
|
||||
height: 56,
|
||||
paddingHorizontal: 16,
|
||||
flexDirection: 'row',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'space-between',
|
||||
backgroundColor: '#F5F5F5',
|
||||
borderBottomWidth: 1,
|
||||
borderColor: '#E0E0E0',
|
||||
},
|
||||
headerText: {
|
||||
fontSize: 18,
|
||||
fontWeight: '500',
|
||||
fontSize: 18,
|
||||
fontWeight: '500',
|
||||
},
|
||||
loader: {
|
||||
flex: 1,
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
flex: 1,
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
},
|
||||
}),
|
||||
}),
|
||||
|
||||
ICON_SMALL_SIZE: 16,
|
||||
ICON_MID_SIZE: 22,
|
||||
@@ -2095,7 +2122,7 @@ export const PurpleTheme = {
|
||||
}
|
||||
|
||||
const [top, end, bottom, start] =
|
||||
typeof values === 'string' ? values.split(' ').map(Number) : values;
|
||||
typeof values === 'string' ? values.split(' ').map(Number) : values;
|
||||
|
||||
return {
|
||||
[`${type}Top`]: top,
|
||||
@@ -2123,4 +2150,4 @@ function generateBoxShadowStyle() {
|
||||
elevation: 4,
|
||||
shadowColor: '#000',
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -34,10 +34,10 @@
|
||||
9C7CDF432C7CC13500243A9A /* RNSecureKeystoreModule.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C7CDF422C7CC13500243A9A /* RNSecureKeystoreModule.m */; };
|
||||
9CAE74EE2E2E38F800C2532C /* pixelpass in Frameworks */ = {isa = PBXBuildFile; productRef = 9CAE74ED2E2E38F800C2532C /* pixelpass */; };
|
||||
9CCCA19E2CF87A8400D5A461 /* securekeystore in Frameworks */ = {isa = PBXBuildFile; productRef = 9CCCA19D2CF87A8400D5A461 /* securekeystore */; };
|
||||
9CD470CE2DFFF86600C207F9 /* OpenID4VP in Frameworks */ = {isa = PBXBuildFile; productRef = 9CD470CD2DFFF86600C207F9 /* OpenID4VP */; };
|
||||
9CDFD3102E28CA7B00505CEF /* VCIClient in Frameworks */ = {isa = PBXBuildFile; productRef = 9CDFD30F2E28CA7B00505CEF /* VCIClient */; };
|
||||
B18059E884C0ABDD17F3DC3D /* ExpoModulesProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAC715A2D49A985799AEE119 /* ExpoModulesProvider.swift */; };
|
||||
BB2F792D24A3F905000567C9 /* Expo.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB2F792C24A3F905000567C9 /* Expo.plist */; };
|
||||
C3F18B1A2E320C85007DBE73 /* OpenID4VP in Frameworks */ = {isa = PBXBuildFile; productRef = C3F18B192E320C85007DBE73 /* OpenID4VP */; };
|
||||
C3F18B1D2E320C9A007DBE73 /* VCIClient in Frameworks */ = {isa = PBXBuildFile; productRef = C3F18B1C2E320C9A007DBE73 /* VCIClient */; };
|
||||
E86208152C0335C5007C3E24 /* RNVCIClientModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = E86208142C0335C5007C3E24 /* RNVCIClientModule.swift */; };
|
||||
E86208172C0335EC007C3E24 /* RNVCIClientModule.m in Sources */ = {isa = PBXBuildFile; fileRef = E86208162C0335EC007C3E24 /* RNVCIClientModule.m */; };
|
||||
FD8D20B92BBAACDF009AD01C /* Fontisto.ttf in Resources */ = {isa = PBXBuildFile; fileRef = FD8D20A62BBAACDF009AD01C /* Fontisto.ttf */; };
|
||||
@@ -123,11 +123,11 @@
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
9CDFD3102E28CA7B00505CEF /* VCIClient in Frameworks */,
|
||||
C3F18B1D2E320C9A007DBE73 /* VCIClient in Frameworks */,
|
||||
9C4850432C3E5873002ECBD5 /* ios-tuvali-library in Frameworks */,
|
||||
9CAE74EE2E2E38F800C2532C /* pixelpass in Frameworks */,
|
||||
9CCCA19E2CF87A8400D5A461 /* securekeystore in Frameworks */,
|
||||
9CD470CE2DFFF86600C207F9 /* OpenID4VP in Frameworks */,
|
||||
C3F18B1A2E320C85007DBE73 /* OpenID4VP in Frameworks */,
|
||||
96905EF65AED1B983A6B3ABC /* libPods-Inji.a in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
@@ -305,7 +305,6 @@
|
||||
00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
|
||||
800E24972A6A228C8D4807E9 /* [CP] Copy Pods Resources */,
|
||||
D11A8C363B4A5B625DB10379 /* [CP] Embed Pods Frameworks */,
|
||||
9CDFD3112E2A2F7900505CEF /* ShellScript */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
@@ -315,9 +314,9 @@
|
||||
packageProductDependencies = (
|
||||
9C4850422C3E5873002ECBD5 /* ios-tuvali-library */,
|
||||
9CCCA19D2CF87A8400D5A461 /* securekeystore */,
|
||||
9CD470CD2DFFF86600C207F9 /* OpenID4VP */,
|
||||
9CDFD30F2E28CA7B00505CEF /* VCIClient */,
|
||||
9CAE74ED2E2E38F800C2532C /* pixelpass */,
|
||||
C3F18B192E320C85007DBE73 /* OpenID4VP */,
|
||||
C3F18B1C2E320C9A007DBE73 /* VCIClient */,
|
||||
);
|
||||
productName = Inji;
|
||||
productReference = 13B07F961A680F5B00A75B9A /* Inji.app */;
|
||||
@@ -348,9 +347,9 @@
|
||||
packageReferences = (
|
||||
9C4850412C3E5873002ECBD5 /* XCRemoteSwiftPackageReference "tuvali-ios-swift" */,
|
||||
9CCCA19C2CF87A8400D5A461 /* XCRemoteSwiftPackageReference "secure-keystore-ios-swift" */,
|
||||
9CD470CC2DFFF86600C207F9 /* XCRemoteSwiftPackageReference "inji-openid4vp-ios-swift" */,
|
||||
9CDFD30E2E28CA7B00505CEF /* XCRemoteSwiftPackageReference "inji-vci-client-ios-swift" */,
|
||||
9CAE74EC2E2E38F800C2532C /* XCRemoteSwiftPackageReference "pixelpass-ios-swift" */,
|
||||
C3F18B182E320C85007DBE73 /* XCRemoteSwiftPackageReference "inji-openid4vp-ios-swift" */,
|
||||
C3F18B1B2E320C9A007DBE73 /* XCRemoteSwiftPackageReference "inji-vci-client-ios-swift" */,
|
||||
);
|
||||
productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */;
|
||||
projectDirPath = "";
|
||||
@@ -850,17 +849,17 @@
|
||||
version = 0.3.0;
|
||||
};
|
||||
};
|
||||
9CD470CC2DFFF86600C207F9 /* XCRemoteSwiftPackageReference "inji-openid4vp-ios-swift" */ = {
|
||||
C3F18B182E320C85007DBE73 /* XCRemoteSwiftPackageReference "inji-openid4vp-ios-swift" */ = {
|
||||
isa = XCRemoteSwiftPackageReference;
|
||||
repositoryURL = "https://github.com/mosip/inji-openid4vp-ios-swift";
|
||||
repositoryURL = "https://github.com/mosip/inji-openid4vp-ios-swift.git";
|
||||
requirement = {
|
||||
branch = develop;
|
||||
branch = "release-0.4.x";
|
||||
kind = branch;
|
||||
};
|
||||
};
|
||||
9CDFD30E2E28CA7B00505CEF /* XCRemoteSwiftPackageReference "inji-vci-client-ios-swift" */ = {
|
||||
C3F18B1B2E320C9A007DBE73 /* XCRemoteSwiftPackageReference "inji-vci-client-ios-swift" */ = {
|
||||
isa = XCRemoteSwiftPackageReference;
|
||||
repositoryURL = "https://github.com/mosip/inji-vci-client-ios-swift/";
|
||||
repositoryURL = "https://github.com/mosip/inji-vci-client-ios-swift";
|
||||
requirement = {
|
||||
branch = "release-0.4.x";
|
||||
kind = branch;
|
||||
@@ -884,14 +883,14 @@
|
||||
package = 9CCCA19C2CF87A8400D5A461 /* XCRemoteSwiftPackageReference "secure-keystore-ios-swift" */;
|
||||
productName = securekeystore;
|
||||
};
|
||||
9CD470CD2DFFF86600C207F9 /* OpenID4VP */ = {
|
||||
C3F18B192E320C85007DBE73 /* OpenID4VP */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
package = 9CD470CC2DFFF86600C207F9 /* XCRemoteSwiftPackageReference "inji-openid4vp-ios-swift" */;
|
||||
package = C3F18B182E320C85007DBE73 /* XCRemoteSwiftPackageReference "inji-openid4vp-ios-swift" */;
|
||||
productName = OpenID4VP;
|
||||
};
|
||||
9CDFD30F2E28CA7B00505CEF /* VCIClient */ = {
|
||||
C3F18B1C2E320C9A007DBE73 /* VCIClient */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
package = 9CDFD30E2E28CA7B00505CEF /* XCRemoteSwiftPackageReference "inji-vci-client-ios-swift" */;
|
||||
package = C3F18B1B2E320C9A007DBE73 /* XCRemoteSwiftPackageReference "inji-vci-client-ios-swift" */;
|
||||
productName = VCIClient;
|
||||
};
|
||||
/* End XCSwiftPackageProductDependency section */
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"originHash" : "5737403c0b9f43f503dc98794e8805e76575a62d145e75f6c4c953bff4223584",
|
||||
"originHash" : "327f856a9787c0e4bf4517bc1e50ff1e45a4aee6adcc4233b1e042d022a881f0",
|
||||
"pins" : [
|
||||
{
|
||||
"identity" : "alamofire",
|
||||
@@ -51,8 +51,8 @@
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/krzyzanowskim/CryptoSwift.git",
|
||||
"state" : {
|
||||
"revision" : "729e01bc9b9dab466ac85f21fb9ee2bc1c61b258",
|
||||
"version" : "1.8.4"
|
||||
"revision" : "132f5b209cd0251067f29cdb59c97d9f8a63252a",
|
||||
"version" : "1.8.5"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -67,19 +67,19 @@
|
||||
{
|
||||
"identity" : "inji-openid4vp-ios-swift",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/mosip/inji-openid4vp-ios-swift",
|
||||
"location" : "https://github.com/mosip/inji-openid4vp-ios-swift.git",
|
||||
"state" : {
|
||||
"branch" : "develop",
|
||||
"revision" : "b93f78c94cd7632f2a80e869520788abd1378621"
|
||||
"branch" : "release-0.4.x",
|
||||
"revision" : "27c07b6294333adee624a4bc6b3b14506b9dae3e"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identity" : "inji-vci-client-ios-swift",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/mosip/inji-vci-client-ios-swift/",
|
||||
"location" : "https://github.com/mosip/inji-vci-client-ios-swift",
|
||||
"state" : {
|
||||
"branch" : "release-0.4.x",
|
||||
"revision" : "56359149fbfa61e4fd334df21bf2116e05b4d02d"
|
||||
"revision" : "e4e5e57bccf3a42f094b27047c68c7ce77bc03b3"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -7,7 +7,6 @@ class RNOpenId4VpModule: NSObject, RCTBridgeModule {
|
||||
|
||||
private var openID4VP: OpenID4VP?
|
||||
|
||||
|
||||
static func moduleName() -> String {
|
||||
return "InjiOpenID4VP"
|
||||
}
|
||||
@@ -180,7 +179,6 @@ func sendErrorToVerifier(_ error: String, _ errorCode: String,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
func toJsonString(jsonObject: AuthorizationRequest) throws -> String {
|
||||
let encoder = JSONEncoder()
|
||||
encoder.keyEncodingStrategy = .convertToSnakeCase
|
||||
@@ -230,8 +228,8 @@ func getWalletMetadataFromDict(_ walletMetadata: Any,
|
||||
reject("OPENID4VP", "Invalid wallet metadata format", nil)
|
||||
throw NSError(domain: "", code: -1, userInfo: [NSLocalizedDescriptionKey: "Invalid Wallet Metadata"])
|
||||
}
|
||||
|
||||
var vpFormatsSupported: [FormatType: VPFormatSupported] = [:]
|
||||
|
||||
var vpFormatsSupported: [VPFormatType: VPFormatSupported] = [:]
|
||||
if let vpFormatsSupportedDict = metadata["vp_formats_supported"] as? [String: Any],
|
||||
let ldpVcDict = vpFormatsSupportedDict["ldp_vc"] as? [String: Any] {
|
||||
let algValuesSupported = ldpVcDict["alg_values_supported"] as? [String]
|
||||
@@ -245,12 +243,13 @@ func getWalletMetadataFromDict(_ walletMetadata: Any,
|
||||
}
|
||||
|
||||
let walletMetadataObject = try WalletMetadata(
|
||||
presentationDefinitionURISupported: metadata["presentation_definition_uri_supported"] as? Bool,
|
||||
presentationDefinitionURISupported: metadata["presentation_definition_uri_supported"] as? Bool ?? true,
|
||||
vpFormatsSupported: vpFormatsSupported,
|
||||
clientIdSchemesSupported: mapStringsToEnum(metadata["client_id_schemes_supported"] as? [String] ?? [], using: ClientIdScheme.fromValue),
|
||||
requestObjectSigningAlgValuesSupported: mapStringsToEnum(metadata["request_object_signing_alg_values_supported"] as? [String] ?? [], using: RequestSigningAlgorithm.fromValue),
|
||||
authorizationEncryptionAlgValuesSupported: mapStringsToEnum(metadata["authorization_encryption_alg_values_supported"] as? [String] ?? [], using: KeyManagementAlgorithm.fromValue),
|
||||
authorizationEncryptionEncValuesSupported: mapStringsToEnum(metadata["authorization_encryption_enc_values_supported"] as? [String] ?? [], using: ContentEncryptionAlgorithm.fromValue)
|
||||
authorizationEncryptionEncValuesSupported: mapStringsToEnum(metadata["authorization_encryption_enc_values_supported"] as? [String] ?? [], using: ContentEncryptionAlgorithm.fromValue),
|
||||
responseTypesSupported: mapStringsToEnum(metadata["response_types_supported"] as? [String] ?? [], using: ResponseType.fromValue)
|
||||
)
|
||||
return walletMetadataObject
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
{
|
||||
"ActivityLogText": {
|
||||
"VC_SHARED": "تم مشاركة {{idType}} بنجاح.",
|
||||
@@ -1103,8 +1104,13 @@
|
||||
"TransactionCode": "رمز المعاملة"
|
||||
},
|
||||
"trustScreen": {
|
||||
"description": "يرجى التأكد من أن هذه البطاقة من مصدر موثوق قبل التنزيل. بمجرد التنزيل، سيتم حفظها في محفظتك ويمكن استخدامها في أي وقت.",
|
||||
"confirm": "نعم، أثق بهذا",
|
||||
"cancel": "لا، أعدني"
|
||||
"description": "تأكد من أنك تعرف أو تثق بهذا المصدر. بمجرد أن تثق بهذا المصدر:",
|
||||
"infoPoints": [
|
||||
"سيتم حفظ البطاقة بأمان في محفظتك.",
|
||||
"سيتم إضافة هذا المصدر إلى قائمتك الموثوقة.",
|
||||
"لن تحتاج إلى مراجعة الثقة مرة أخرى عند التحميل منهم في المرة القادمة."
|
||||
],
|
||||
"confirm": "نعم، أنا أثق بهذا المصدر",
|
||||
"cancel": "لا، أعدني إلى الخلف"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1123,8 +1123,13 @@
|
||||
"TransactionCode": "Transasction Code"
|
||||
},
|
||||
"trustScreen": {
|
||||
"description": "Please make sure this card is from a trusted source before downloading.Once downloaded, it will be saved in your wallet and can be used anytime.",
|
||||
"confirm": "Yes I Trust This",
|
||||
"description": "Make sure you recognize or trust this issuer. Once you trust this issuer:",
|
||||
"infoPoints": [
|
||||
"The card will be securely saved in your wallet.",
|
||||
"This issuer will be added to your trusted list.",
|
||||
"You won't need to review trust again when downloading from them next time."
|
||||
],
|
||||
"confirm": "Yes, I Trust This Issuer",
|
||||
"cancel": "No, Take Me Back"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1106,8 +1106,13 @@
|
||||
"TransactionCode": "Transaction Code"
|
||||
},
|
||||
"trustScreen": {
|
||||
"description": "Siguraduhin na galing ito sa pinagkakatiwalaang source bago i-download. Kapag na-download, ito'y mase-save sa iyong wallet at maaaring magamit kahit kailan.",
|
||||
"confirm": "Oo, Pinagkakatiwalaan Ko Ito",
|
||||
"cancel": "Hindi, Bumalik Tayo"
|
||||
"description": "Siguraduhin mong kilala mo o pinagkakatiwalaan mo ang issuer na ito. Kapag pinagkatiwalaan mo sila:",
|
||||
"infoPoints": [
|
||||
"Ang card ay ligtas na mase-save sa iyong wallet.",
|
||||
"Ang issuer na ito ay idagdag sa iyong trusted list.",
|
||||
"Hindi mo na kailangang muling suriin ang tiwala kapag magda-download mula sa kanila sa susunod."
|
||||
],
|
||||
"confirm": "Oo, Pinagkakatiwalaan Ko ang Issuer na Ito",
|
||||
"cancel": "Hindi, Ibalik Mo Ako"
|
||||
}
|
||||
}
|
||||
@@ -1107,8 +1107,13 @@
|
||||
"TransactionCode": "लेन-देन कोड"
|
||||
},
|
||||
"trustScreen": {
|
||||
"description": "डाउनलोड करने से पहले सुनिश्चित करें कि यह कार्ड किसी भरोसेमंद स्रोत से है। डाउनलोड के बाद, यह आपके वॉलेट में सेव हो जाएगा और कभी भी इस्तेमाल किया जा सकता है।",
|
||||
"confirm": "हाँ, मैं इस पर भरोसा करता हूँ",
|
||||
"cancel": "नहीं, मुझे वापस ले चलो"
|
||||
"description": "सुनिश्चित करें कि आप इस जारीकर्ता को पहचानते हैं या उस पर भरोसा करते हैं। एक बार जब आप भरोसा कर लेते हैं:",
|
||||
"infoPoints": [
|
||||
"कार्ड सुरक्षित रूप से आपके वॉलेट में सेव हो जाएगा।",
|
||||
"यह जारीकर्ता आपकी विश्वसनीय सूची में जोड़ दिया जाएगा।",
|
||||
"अगली बार उनसे डाउनलोड करते समय दोबारा ट्रस्ट की समीक्षा नहीं करनी होगी।"
|
||||
],
|
||||
"confirm": "हाँ, मैं इस जारीकर्ता पर भरोसा करता हूँ",
|
||||
"cancel": "नहीं, मुझे वापस ले चलें"
|
||||
}
|
||||
}
|
||||
@@ -1106,8 +1106,13 @@
|
||||
"TransactionCode": "ವಹಿವಾಟು ಕೋಡ್"
|
||||
},
|
||||
"trustScreen": {
|
||||
"description": "ಡೌನ್ಲೋಡ್ ಮಾಡುವ ಮೊದಲು ಈ ಕಾರ್ಡ್ ನಂಬಿಕಸ್ತ ಮೂಲದಿಂದ ಇದೆಯೆಂದು ಖಚಿತಪಡಿಸಿಕೊಳ್ಳಿ. ಡೌನ್ಲೋಡ್ ಮಾಡಿದ ನಂತರ, ಇದು ನಿಮ್ಮ ವ್ಯಾಲೆಟ್ನಲ್ಲಿ ಉಳಿಯುತ್ತದೆ ಮತ್ತು ಯಾವಾಗ ಬೇಕಾದರೂ ಬಳಸಬಹುದು.",
|
||||
"confirm": "ಹೌದು, ನಾನು ನಂಬುತ್ತೇನೆ",
|
||||
"cancel": "ಇಲ್ಲ, ನನನ್ನು ಹಿಂದಕ್ಕೆ ಕರೆ"
|
||||
"description": "ಈ ಹೊರಹೊಮ್ಮಿಸುವವರನ್ನು ನೀವು ಗುರುತಿಸುತ್ತೀರಾ ಅಥವಾ ನಂಬಿದೀರಾ ಎಂಬುದನ್ನು ಖಚಿತಪಡಿಸಿಕೊಳ್ಳಿ. ನೀವು ನಂಬಿದ ನಂತರ:",
|
||||
"infoPoints": [
|
||||
"ಕಾರ್ಡ್ ನಿಮ್ಮ ವಾಲೆಟ್ನಲ್ಲಿ ಸುರಕ್ಷಿತವಾಗಿ ಉಳಿಸಲಾಗುತ್ತದೆ.",
|
||||
"ಈ ಹೊರಹೊಮ್ಮಿಸುವವರನ್ನು ನಿಮ್ಮ ನಂಬಲರ್ಹ ಪಟ್ಟಿಗೆ ಸೇರಿಸಲಾಗುತ್ತದೆ.",
|
||||
"ಮುಂದಿನ ಬಾರಿಯದು ಡೌನ್ಲೋಡ್ ಮಾಡುವಾಗ ನಂಬಿಕೆಯನ್ನು ಮರುಪರಿಶೀಲಿಸುವ ಅಗತ್ಯವಿಲ್ಲ."
|
||||
],
|
||||
"confirm": "ಹೌದು, ನಾನು ಈ ಹೊರಹೊಮ್ಮಿಸುವವರನ್ನು ನಂಬುತ್ತೇನೆ",
|
||||
"cancel": "ಇಲ್ಲ, ನನನ್ನು ಹಿಂಪಡೆ"
|
||||
}
|
||||
}
|
||||
@@ -1106,8 +1106,13 @@
|
||||
"TransactionCode": "பரிவரத்து குறியீடு"
|
||||
},
|
||||
"trustScreen": {
|
||||
"description": "இந்த அட்டை நம்பகமானதாக இருப்பதை உறுதிசெய்துகொள்ளுங்கள். பதிவிறக்கப்பட்ட பிறகு, இது உங்கள் பணப்பையில் சேமிக்கப்படும் மற்றும் எப்போது வேண்டுமானாலும் பயன்படுத்தலாம்.",
|
||||
"confirm": "ஆம், நம்புகிறேன்",
|
||||
"cancel": "இல்லை, என்னை திரும்ப அழைத்துச் செல்"
|
||||
"description": "இந்த வெளியீட்டாளரை நீங்கள் அறிந்தவரா அல்லது நம்புகிறீர்களா என்பதை உறுதி செய்யவும். நீங்கள் வெளியீட்டாளரை நம்பினால்:",
|
||||
"infoPoints": [
|
||||
"அட்டை பாதுகாப்பாக உங்கள் வாலட்டில் சேமிக்கப்படும்.",
|
||||
"இந்த வெளியீட்டாளர் உங்கள் நம்பகமான பட்டியலில் சேர்க்கப்படுவார்.",
|
||||
"அவர்களிடமிருந்து அடுத்தமுறை பதிவிறக்கும் போது மீண்டும் நம்பிக்கை சரிபார்க்க வேண்டியதில்லை."
|
||||
],
|
||||
"confirm": "ஆம், இந்த வெளியீட்டாளரை நம்புகிறேன்",
|
||||
"cancel": "இல்லை, எனை மீண்டும் கொண்டு செல்"
|
||||
}
|
||||
}
|
||||
@@ -1,50 +1,90 @@
|
||||
import React from 'react';
|
||||
import { Modal, View, Text, Image } from 'react-native';
|
||||
import { Button } from '../../components/ui';
|
||||
import { Theme } from '../../components/ui/styleUtils';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import {Modal, View, Text, Image, ScrollView} from 'react-native';
|
||||
import {Button} from '../../components/ui';
|
||||
import {Theme} from '../../components/ui/styleUtils';
|
||||
import {useTranslation} from 'react-i18next';
|
||||
|
||||
export const TrustIssuerModal = ({
|
||||
isVisible,
|
||||
issuerLogo,
|
||||
issuerName,
|
||||
onConfirm,
|
||||
onCancel
|
||||
}: {
|
||||
isVisible,
|
||||
issuerLogo,
|
||||
issuerName,
|
||||
onConfirm,
|
||||
onCancel,
|
||||
}: {
|
||||
isVisible: boolean;
|
||||
issuerLogo: any;
|
||||
issuerName: string;
|
||||
onConfirm: () => void;
|
||||
onCancel: () => void;
|
||||
}) => {
|
||||
const { t } = useTranslation('trustScreen');
|
||||
const {t} = useTranslation('trustScreen');
|
||||
return (
|
||||
<Modal transparent={true} visible={isVisible} animationType="fade">
|
||||
<View
|
||||
style={Theme.TrustIssuerScreenStyle.modalOverlay}>
|
||||
<View
|
||||
style={Theme.TrustIssuerScreenStyle.modalContainer}>
|
||||
|
||||
{(issuerLogo || issuerName) && <View
|
||||
style={Theme.TrustIssuerScreenStyle.issuerHeader}>
|
||||
{issuerLogo && <Image
|
||||
source={{ uri: issuerLogo }}
|
||||
style={Theme.TrustIssuerScreenStyle.issuerLogo}
|
||||
/>}
|
||||
{issuerName && <Text
|
||||
style={Theme.TrustIssuerScreenStyle.issuerName}>
|
||||
{issuerName}
|
||||
</Text>}
|
||||
</View>}
|
||||
|
||||
<Text
|
||||
style={Theme.TrustIssuerScreenStyle.description}>
|
||||
<View style={Theme.TrustIssuerScreenStyle.modalOverlay}>
|
||||
<View style={Theme.TrustIssuerScreenStyle.modalContainer}>
|
||||
{(issuerLogo || issuerName) && (
|
||||
<View style={Theme.TrustIssuerScreenStyle.issuerHeader}>
|
||||
{issuerLogo && (
|
||||
<Image
|
||||
source={{uri: issuerLogo}}
|
||||
style={Theme.TrustIssuerScreenStyle.issuerLogo}
|
||||
/>
|
||||
)}
|
||||
{issuerName && (
|
||||
<Text style={Theme.TrustIssuerScreenStyle.issuerName}>
|
||||
{issuerName}
|
||||
</Text>
|
||||
)}
|
||||
</View>
|
||||
)}
|
||||
<ScrollView
|
||||
style={{flex: 1, width: '100%'}}
|
||||
contentContainerStyle={{alignItems: 'center', paddingBottom: 10}}
|
||||
showsVerticalScrollIndicator={true}>
|
||||
<Text style={Theme.TrustIssuerScreenStyle.description}>
|
||||
{t('description')}
|
||||
</Text>
|
||||
<Button styles={{ marginBottom: 6 }} type='gradient' title={t('confirm')} onPress={onConfirm} />
|
||||
<Button styles={{ marginBottom: -10 }} type='clear' title={t('cancel')} onPress={onCancel} />
|
||||
</Text>
|
||||
|
||||
<View style={Theme.TrustIssuerScreenStyle.infoContainer}>
|
||||
{t('infoPoints', {returnObjects: true}).map((point, index) => (
|
||||
<View key={index} style={Theme.TrustIssuerScreenStyle.infoItem}>
|
||||
<Text style={Theme.TrustIssuerScreenStyle.info}>•</Text>
|
||||
<Text style={Theme.TrustIssuerScreenStyle.infoText}>
|
||||
{point}
|
||||
</Text>
|
||||
</View>
|
||||
))}
|
||||
</View>
|
||||
</ScrollView>
|
||||
|
||||
<View style={{width: '100%', paddingTop: 10, paddingBottom: 5}}>
|
||||
<Button
|
||||
styles={{
|
||||
marginBottom: 3,
|
||||
minHeight: 50,
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
}}
|
||||
type="gradient"
|
||||
title={t('confirm')}
|
||||
onPress={onConfirm}
|
||||
/>
|
||||
<Button
|
||||
styles={{
|
||||
marginBottom: -10,
|
||||
paddingBottom: 20,
|
||||
minHeight: 80,
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
maxWidth: '100%',
|
||||
}}
|
||||
type="clear"
|
||||
title={t('cancel')}
|
||||
onPress={onCancel}
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
</Modal>
|
||||
);
|
||||
};
|
||||
};
|
||||
@@ -129,8 +129,14 @@ export function parseMetadatas(metadataStrings: object[]) {
|
||||
}
|
||||
|
||||
export const getVCMetadata = (context: object, keyType: string) => {
|
||||
const issuer = context.selectedIssuer.credential_issuer_host ?? context.selectedIssuer.credential_issuer;
|
||||
const credentialId = `${UUID.generate()}_${issuer}`;
|
||||
const issuerHost =
|
||||
context.selectedIssuer.credential_issuer_host ??
|
||||
context.selectedIssuer.credential_issuer;
|
||||
const issuer =
|
||||
context.selectedIssuer.issuer_id ??
|
||||
context.selectedIssuer.credential_issuer;
|
||||
|
||||
const credentialId = `${UUID.generate()}_${issuerHost}`;
|
||||
|
||||
return VCMetadata.fromVC({
|
||||
requestId: credentialId,
|
||||
@@ -147,7 +153,7 @@ export const getVCMetadata = (context: object, keyType: string) => {
|
||||
format: context['credentialWrapper'].format,
|
||||
downloadKeyType: keyType,
|
||||
credentialType: getCredentialType(context.selectedCredentialType),
|
||||
issuerHost: issuer
|
||||
issuerHost: issuerHost,
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import {
|
||||
SelectedCredentialsForVPSharing,
|
||||
VC,
|
||||
} from '../../machines/VerifiableCredential/VCMetaMachine/vc';
|
||||
import {fallbackWalletMetadata} from './fallbackWalletMetadata';
|
||||
import {walletMetadata} from './walletMetadata';
|
||||
import {getWalletMetadata, isClientValidationRequired} from './OpenID4VPHelper';
|
||||
import {parseJSON} from '../Utils';
|
||||
|
||||
@@ -20,9 +20,9 @@ class OpenID4VP {
|
||||
|
||||
private static async getInstance(): Promise<OpenID4VP> {
|
||||
if (!OpenID4VP.instance) {
|
||||
const walletMetadata =
|
||||
(await getWalletMetadata()) || fallbackWalletMetadata;
|
||||
OpenID4VP.instance = new OpenID4VP(walletMetadata);
|
||||
const walletMetadataConfig =
|
||||
(await getWalletMetadata()) || walletMetadata;
|
||||
OpenID4VP.instance = new OpenID4VP(walletMetadataConfig);
|
||||
}
|
||||
return OpenID4VP.instance;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
export const fallbackWalletMetadata = {
|
||||
presentation_definition_uri_supported: false,
|
||||
export const walletMetadata = {
|
||||
response_types_supported: ['vp_token'],
|
||||
presentation_definition_uri_supported: true,
|
||||
vp_formats_supported: {
|
||||
ldp_vc: {
|
||||
alg_values_supported: [
|
||||
@@ -38,7 +38,7 @@ export const Protocols = {
|
||||
};
|
||||
|
||||
export const Issuers = {
|
||||
MosipOtp: '',
|
||||
MosipOtp: 'MosipOtp',
|
||||
Mosip: 'Mosip',
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user