Merge remote-tracking branch 'upstream/develop' into injimob-2265-ovp-enhancement

This commit is contained in:
PuBHARGAVI
2024-12-01 23:43:17 +05:30
83 changed files with 2199 additions and 1039 deletions

4
.env
View File

@@ -8,8 +8,8 @@ ESIGNET_HOST=https://esignet.qa-inji.mosip.net
OBSRV_HOST = https://dataset-api.telemetry.mosip.net
#Application Theme can be ( orange | purple )
APPLICATION_THEME=orange
#Application Theme can be ( gradient | purple )
APPLICATION_THEME=gradient
#environment can be changed if it is toggled
CREDENTIAL_REGISTRY_EDIT=true

View File

@@ -30,10 +30,10 @@ on:
theme:
description: 'Application Theme'
required: true
default: 'orange'
default: 'gradient'
type: choice
options:
- orange
- gradient
- purple
type:
description: 'Apk type'

View File

@@ -61,10 +61,10 @@ on:
theme:
description: 'Application Theme'
required: true
default: 'orange'
default: 'gradient'
type: choice
options:
- orange
- gradient
- purple
allow_env_edit:
description: 'Edit ENV'

View File

@@ -74,7 +74,7 @@ jobs:
env:
MIMOTO_HOST: ${{ github.event.inputs.backendServiceUrlMimoto }}
ESIGNET_HOST: ${{ github.event.inputs.backendServiceUrlEsignet }}
APPLICATION_THEME: 'orange'
APPLICATION_THEME: 'gradient'
CREDENTIAL_REGISTRY_EDIT: 'false'
RELEASE_KEYSTORE_ALIAS: 'androidreleasekey'
RELEASE_KEYSTORE_PASSWORD: "${{ secrets.INJI_ANDROID_RELEASE_STOREPASS }}"
@@ -149,7 +149,7 @@ jobs:
env:
MIMOTO_HOST: ${{ github.event.inputs.backendServiceUrlMimoto }}
ESIGNET_HOST: ${{ github.event.inputs.backendServiceUrlEsignet }}
APPLICATION_THEME: 'orange'
APPLICATION_THEME: 'gradient'
APP_FLAVOR: 'residentapp'
CREDENTIAL_REGISTRY_EDIT: 'false'
INJI_IOS_TEMP_KEYCHAIN_PASSWORD: '${{ secrets.INJI_IOS_TEMP_KEYCHAIN_PASSWORD }}'

View File

@@ -166,7 +166,7 @@ fileignoreconfig:
- filename: shared/storage.ts
checksum: 181bbdfe1f4a7daa82c7e8ea1050028c4c50f72200ab2a5eff5bfe1915c7de68
- filename: shared/constants.ts
checksum: 69aa79ed25fee2162de7c8e065930e18168551377420a520092bdf6a86c7712d
checksum: b183a74ebd7bdba4efe44e6fc4cc87d3f14f6f83ffc007b7ec1f1697a6c73f0e
- filename: machines/backupAndRestore/backup.ts
checksum: 9810de8d626df3a2cf8266e4be0c1b50aa3bce3c6e3b082afaa3e3ecab66af17
- filename: machines/backupAndRestore/backup.typegen.ts

View File

@@ -54,8 +54,8 @@ ESIGNET_HOST = https://esignet.collab.mosip.net/
OBSRV_HOST = https://dataset-api.obsrv.mosip.net
Telemetry Dashboard = https://druid.obsrv.mosip.net/unified-console.html#workbench
#Application Theme can be ( orange | purple ), defaults to orange theme
APPLICATION_THEME=orange
#Application Theme can be ( grdaient | purple ), defaults to grdaient theme
APPLICATION_THEME=grdaient
#environment can be changed if it is toggled
CREDENTIAL_REGISTRY_EDIT=true

View File

@@ -1,5 +1,5 @@
import {formatDistanceToNow} from 'date-fns';
import {getIdType} from './VC/common/VCUtils';
import {getCredentialTypeFromWellKnown} from './VC/common/VCUtils';
import * as DateFnsLocale from 'date-fns/locale';
import {VCItemContainerFlowType} from '../shared/Utils';
import {TFunction} from 'react-i18next';
@@ -60,10 +60,13 @@ export class VCActivityLog implements ActivityLog {
getActionText(t: TFunction, wellknown: Object | undefined) {
if (!!this.credentialConfigurationId && wellknown) {
const cardType = getIdType(wellknown, this.credentialConfigurationId);
return `${t(this.type, {idType: cardType, id: this.id})}`;
const cardType = getCredentialTypeFromWellKnown(
wellknown,
this.credentialConfigurationId,
);
return `${t(this.type, {idType: cardType})}`;
}
return `${t(this.type, {idType: '', id: this.id})}`;
return `${t(this.type, {idType: ''})}`;
}
static getLogFromObject(data: Object): VCActivityLog {

View File

@@ -138,7 +138,6 @@ export const BannerNotificationContainer: React.FC<
export type vcVerificationBannerDetails = {
statusType: BannerStatus;
vcType: string;
vcNumber: string;
};
export interface BannerNotificationContainerProps {

View File

@@ -100,7 +100,6 @@ export const VCCardView: React.FC<VCItemProps> = props => {
isKebabPopUp={controller.isKebabPopUp}
DISMISS={controller.DISMISS}
KEBAB_POPUP={controller.KEBAB_POPUP}
isVerified={props.vcMetadata.isVerified}
isInitialLaunch={props.isInitialLaunch}
/>
);

View File

@@ -1,6 +1,5 @@
import React from 'react';
import {ImageBackground, Pressable, Image, View} from 'react-native';
import {getLocalizedField} from '../../../i18n';
import {VCMetadata} from '../../../shared/VCMetadata';
import {KebabPopUp} from '../../KebabPopUp';
import {Credential} from '../../../machines/VerifiableCredential/VCMetaMachine/vc';
@@ -9,12 +8,7 @@ import {Theme} from '../../ui/styleUtils';
import {CheckBox, Icon} from 'react-native-elements';
import {SvgImage} from '../../ui/svg';
import {VcItemContainerProfileImage} from '../../VcItemContainerProfileImage';
import {
isVCLoaded,
getBackgroundColour,
getBackgroundImage,
DisplayName,
} from '../common/VCUtils';
import {isVCLoaded, getCredentialType, Display} from '../common/VCUtils';
import {VCItemFieldValue} from '../common/VCItemField';
import {WalletBinding} from '../../../screens/Home/MyVcs/WalletBinding';
import {VCVerification} from '../../VCVerification';
@@ -22,11 +16,12 @@ import {isActivationNeeded} from '../../../shared/openId4VCI/Utils';
import {VCItemContainerFlowType} from '../../../shared/Utils';
import {RemoveVcWarningOverlay} from '../../../screens/Home/MyVcs/RemoveVcWarningOverlay';
import {HistoryTab} from '../../../screens/Home/MyVcs/HistoryTab';
import {getTextColor} from '../common/VCUtils';
import {useCopilot} from 'react-native-copilot';
import {useTranslation} from 'react-i18next';
export const VCCardViewContent: React.FC<VCItemContentProps> = props => {
const wellknownDisplayProperty = new Display(props.wellknown);
const vcSelectableButton =
props.selectable &&
(props.flow === VCItemContainerFlowType.VP_SHARE ? (
@@ -64,12 +59,12 @@ export const VCCardViewContent: React.FC<VCItemContentProps> = props => {
return (
<ImageBackground
source={getBackgroundImage(props.wellknown, Theme.CloseCard)}
source={wellknownDisplayProperty.getBackgroundImage(Theme.CloseCard)}
resizeMode="stretch"
imageStyle={Theme.Styles.vcBg}
style={[
Theme.Styles.backgroundImageContainer,
getBackgroundColour(props.wellknown),
wellknownDisplayProperty.getBackgroundColor(),
]}>
<View
onLayout={
@@ -81,15 +76,17 @@ export const VCCardViewContent: React.FC<VCItemContentProps> = props => {
{VcItemContainerProfileImage(props)}
<Column fill align={'space-around'} margin="0 10 0 10">
<VCItemFieldValue
key={'fullName'}
testID="fullName"
fieldValue={getLocalizedField(DisplayName(props))}
wellknown={props.wellknown}
key={'credentialType'}
testID="credentialType"
fieldValue={getCredentialType(props.wellknown)}
fieldValueColor={wellknownDisplayProperty.getTextColor(
Theme.Colors.Details,
)}
/>
<Row>
<VCVerification
wellknown={props.wellknown}
isVerified={props.isVerified}
vcMetadata={props.verifiableCredentialData?.vcMetadata}
display={wellknownDisplayProperty}
/>
</Row>
</Column>
@@ -106,17 +103,17 @@ export const VCCardViewContent: React.FC<VCItemContentProps> = props => {
{!Object.values(VCItemContainerFlowType).includes(props.flow) && (
<>
{!props.walletBindingResponse &&
isActivationNeeded(props.verifiableCredentialData?.issuer)
? SvgImage.walletUnActivatedIcon()
: SvgImage.walletActivatedIcon()}
{!props.verifiableCredentialData?.vcMetadata.isExpired &&
(!props.walletBindingResponse &&
isActivationNeeded(props.verifiableCredentialData?.issuer)
? SvgImage.walletUnActivatedIcon()
: SvgImage.walletActivatedIcon())}
<Pressable
onPress={props.KEBAB_POPUP}
accessible={false}
style={Theme.Styles.kebabPressableContainer}>
<KebabPopUp
iconColor={getTextColor(
props.wellknown,
iconColor={wellknownDisplayProperty.getTextColor(
Theme.Colors.helpText,
)}
vcMetadata={props.vcMetadata}
@@ -166,7 +163,6 @@ export interface VCItemContentProps {
DISMISS: () => {};
isKebabPopUp: boolean;
vcMetadata: VCMetadata;
isVerified?: boolean;
isInitialLaunch?: boolean;
}

View File

@@ -16,11 +16,9 @@ import {isActivationNeeded} from '../../../shared/openId4VCI/Utils';
import {
BOTTOM_SECTION_FIELDS_WITH_DETAILED_ADDRESS_FIELDS,
DETAIL_VIEW_BOTTOM_SECTION_FIELDS,
Display,
KEY_TYPE_FIELD,
fieldItemIterator,
getBackgroundColour,
getBackgroundImage,
getTextColor,
} from '../common/VCUtils';
import {ProfileIcon} from '../../ProfileIcon';
import {VCFormat} from '../../../shared/VCFormat';
@@ -45,6 +43,7 @@ export const VCDetailView: React.FC<VCItemDetailsProps> = props => {
const logo = props.verifiableCredentialData.issuerLogo;
const face = props.verifiableCredentialData.face;
const verifiableCredential = props.credential;
const wellknownDisplayProperty = new Display(props.wellknown);
const shouldShowHrLine = verifiableCredential => {
let availableFieldNames: string[] = [];
@@ -88,9 +87,11 @@ export const VCDetailView: React.FC<VCItemDetailsProps> = props => {
resizeMode="stretch"
style={[
Theme.Styles.openCardBgContainer,
getBackgroundColour(props.wellknown),
wellknownDisplayProperty.getBackgroundColor(),
]}
source={getBackgroundImage(props.wellknown, Theme.OpenCard)}>
source={wellknownDisplayProperty.getBackgroundImage(
Theme.OpenCard,
)}>
<Row padding="14 14 0 14" margin="0 0 0 0">
<Column crossAlign="center">
{getProfileImage(face)}
@@ -122,6 +123,7 @@ export const VCDetailView: React.FC<VCItemDetailsProps> = props => {
props.fields,
verifiableCredential,
props.wellknown,
wellknownDisplayProperty,
props,
)}
</Column>
@@ -131,8 +133,7 @@ export const VCDetailView: React.FC<VCItemDetailsProps> = props => {
style={[
Theme.Styles.hrLine,
{
borderBottomColor: getTextColor(
props.wellknown,
borderBottomColor: wellknownDisplayProperty.getTextColor(
Theme.Styles.hrLine.borderBottomColor,
),
},
@@ -143,13 +144,13 @@ export const VCDetailView: React.FC<VCItemDetailsProps> = props => {
DETAIL_VIEW_BOTTOM_SECTION_FIELDS,
verifiableCredential,
props.wellknown,
wellknownDisplayProperty,
props,
)}
<VCItemField
key={'keyTypeVcDetailView'}
fieldName={KEY_TYPE_FIELD}
fieldValue={props.keyType}
verifiableCredential={verifiableCredential}
testID={'keyTypeVcDetailView'}
/>
</Column>
@@ -158,86 +159,87 @@ export const VCDetailView: React.FC<VCItemDetailsProps> = props => {
</Column>
</Column>
</Column>
{props.vcHasImage && (
<View
style={{
position: 'relative',
backgroundColor: Theme.Colors.DetailedViewBackground,
}}>
{props.activeTab !== 1 &&
(!props.walletBindingResponse &&
isActivationNeeded(props.verifiableCredentialData?.issuer) ? (
<Column
padding="10"
style={Theme.Styles.detailedViewActivationPopupContainer}>
<Row>
<Column crossAlign="flex-start" margin={'2 0 0 10'}>
{SvgImage.WalletUnActivatedLargeIcon()}
</Column>
<Column crossAlign="flex-start" margin={'5 18 13 8'}>
<Text
testID="offlineAuthDisabledHeader"
style={{
fontFamily: 'Inter_600SemiBold',
fontSize: 14,
}}
color={Theme.Colors.statusLabel}
margin={'0 18 0 0'}>
{t('offlineAuthDisabledHeader')}
</Text>
<Text
testID="offlineAuthDisabledMessage"
style={{
fontFamily: 'Inter_400Regular',
fontSize: 12,
}}
color={Theme.Colors.statusMessage}
margin={'0 18 0 0'}>
{t('offlineAuthDisabledMessage')}
</Text>
</Column>
</Row>
{props.vcHasImage &&
!props.verifiableCredentialData?.vcMetadata.isExpired && (
<View
style={{
position: 'relative',
backgroundColor: Theme.Colors.DetailedViewBackground,
}}>
{props.activeTab !== 1 &&
(!props.walletBindingResponse &&
isActivationNeeded(props.verifiableCredentialData?.issuer) ? (
<Column
padding="10"
style={Theme.Styles.detailedViewActivationPopupContainer}>
<Row>
<Column crossAlign="flex-start" margin={'2 0 0 10'}>
{SvgImage.WalletUnActivatedLargeIcon()}
</Column>
<Column crossAlign="flex-start" margin={'5 18 13 8'}>
<Text
testID="offlineAuthDisabledHeader"
style={{
fontFamily: 'Inter_600SemiBold',
fontSize: 14,
}}
color={Theme.Colors.statusLabel}
margin={'0 18 0 0'}>
{t('offlineAuthDisabledHeader')}
</Text>
<Text
testID="offlineAuthDisabledMessage"
style={{
fontFamily: 'Inter_400Regular',
fontSize: 12,
}}
color={Theme.Colors.statusMessage}
margin={'0 18 0 0'}>
{t('offlineAuthDisabledMessage')}
</Text>
</Column>
</Row>
<Button
testID="enableVerification"
title={t('enableVerification')}
onPress={props.onBinding}
type="gradient"
size="Large"
disabled={
!props.verifiableCredentialData.vcMetadata.isVerified
}
/>
</Column>
) : (
<Column
style={Theme.Styles.detailedViewActivationPopupContainer}
padding="10">
<Row>
<Column crossAlign="flex-start" margin={'2 0 0 10'}>
{SvgImage.WalletActivatedLargeIcon()}
</Column>
<Column crossAlign="flex-start" margin={'5 18 13 8'}>
<Text
testID="profileAuthenticated"
color={Theme.Colors.statusLabel}
style={{
fontFamily: 'Inter_600SemiBold',
fontSize: 14,
}}
margin={'0 18 0 0'}>
{isActivationNeeded(
props.verifiableCredentialData?.issuer,
)
? t('profileAuthenticated')
: t('credentialActivated')}
</Text>
</Column>
</Row>
</Column>
))}
</View>
)}
<Button
testID="enableVerification"
title={t('enableVerification')}
onPress={props.onBinding}
type="gradient"
size="Large"
disabled={
!props.verifiableCredentialData.vcMetadata.isVerified
}
/>
</Column>
) : (
<Column
style={Theme.Styles.detailedViewActivationPopupContainer}
padding="10">
<Row>
<Column crossAlign="flex-start" margin={'2 0 0 10'}>
{SvgImage.WalletActivatedLargeIcon()}
</Column>
<Column crossAlign="flex-start" margin={'5 18 13 8'}>
<Text
testID="profileAuthenticated"
color={Theme.Colors.statusLabel}
style={{
fontFamily: 'Inter_600SemiBold',
fontSize: 14,
}}
margin={'0 18 0 0'}>
{isActivationNeeded(
props.verifiableCredentialData?.issuer,
)
? t('profileAuthenticated')
: t('credentialActivated')}
</Text>
</Column>
</Row>
</Column>
))}
</View>
)}
</>
);
};

View File

@@ -5,16 +5,23 @@ import {Theme} from '../../ui/styleUtils';
import React from 'react';
import {SvgImage} from '../../ui/svg';
import {useTranslation} from 'react-i18next';
import {getTextColor} from './VCUtils';
export const VCItemFieldName = ({fieldName, wellknown, testID}) => {
export const VCItemFieldName = ({
fieldName,
testID,
fieldNameColor: textColor = Theme.Colors.DetailsLabel,
}: {
fieldName: string;
testID: string;
fieldNameColor?: string;
}) => {
const {t} = useTranslation('ViewVcModal');
return (
<Row>
{fieldName && (
<Text
testID={`${testID}Title`}
color={getTextColor(wellknown, Theme.Colors.DetailsLabel)}
color={textColor}
style={Theme.Styles.fieldItemTitle}>
{fieldName}
</Text>
@@ -63,12 +70,20 @@ export const VCItemFieldName = ({fieldName, wellknown, testID}) => {
);
};
export const VCItemFieldValue = ({fieldValue, wellknown, testID}) => {
export const VCItemFieldValue = ({
fieldValue,
testID,
fieldValueColor: textColor = Theme.Colors.Details,
}: {
fieldValue: string;
testID: string;
fieldValueColor?: string;
}) => {
return (
<>
<Text
testID={`${testID}Value`}
color={getTextColor(wellknown, Theme.Colors.Details)}
color={textColor}
style={Theme.Styles.fieldItemValue}>
{fieldValue}
</Text>
@@ -76,7 +91,7 @@ export const VCItemFieldValue = ({fieldValue, wellknown, testID}) => {
);
};
export const VCItemField = props => {
export const VCItemField: React.FC<VCItemFieldProps> = props => {
return (
<Column>
<VCItemFieldName {...props} />
@@ -84,3 +99,11 @@ export const VCItemField = props => {
</Column>
);
};
interface VCItemFieldProps {
fieldName: string;
fieldValue: string;
testID: string;
fieldNameColor?: string;
fieldValueColor?: string;
}

View File

@@ -14,10 +14,12 @@ import {CREDENTIAL_REGISTRY_EDIT} from 'react-native-dotenv';
import {VCVerification} from '../../VCVerification';
import {MIMOTO_BASE_URL} from '../../../shared/constants';
import {VCItemDetailsProps} from '../Views/VCDetailView';
import {getMatchingCredentialIssuerMetadata} from '../../../shared/openId4VCI/Utils';
import {parseJSON} from '../../../shared/Utils';
import {VCItemContentProps} from '../Views/VCCardViewContent';
import {
getDisplayObjectForCurrentLanguage,
getMatchingCredentialIssuerMetadata,
} from '../../../shared/openId4VCI/Utils';
import {VCFormat} from '../../../shared/VCFormat';
import {displayType} from '../../../machines/Issuers/IssuersMachine';
export const CARD_VIEW_DEFAULT_FIELDS = ['fullName'];
export const DETAIL_VIEW_DEFAULT_FIELDS = [
@@ -43,7 +45,7 @@ export const DETAIL_VIEW_BOTTOM_SECTION_FIELDS = [
'credentialRegistry',
];
export const KEY_TYPE_FIELD = ['keytype'];
export const KEY_TYPE_FIELD = 'keytype';
export const BOTTOM_SECTION_FIELDS_WITH_DETAILED_ADDRESS_FIELDS = [
...getAddressFields(),
'email',
@@ -69,18 +71,19 @@ export const getFieldValue = (
field: string,
wellknown: any,
props: any,
display: Display,
format: string,
) => {
switch (field) {
case 'status':
return (
<VCVerification
wellknown={wellknown}
isVerified={props.verifiableCredentialData.vcMetadata.isVerified}
display={display}
vcMetadata={props.verifiableCredentialData.vcMetadata}
/>
);
case 'idType':
return getIdType(wellknown);
return getCredentialType(wellknown);
case 'credentialRegistry':
return props?.vc?.credentialRegistry;
case 'address':
@@ -147,21 +150,6 @@ export const getFieldName = (
return i18n.t(`VcDetails:${field}`);
};
export const getBackgroundColour = (wellknown: any) => {
return {
backgroundColor:
wellknown?.display[0]?.background_color ?? Theme.Colors.textValue,
};
};
export const getBackgroundImage = (wellknown: any, defaultBackground: any) => {
return wellknown?.display[0]?.background_image ?? defaultBackground;
};
export const getTextColor = (wellknown: any, defaultColor: string) => {
return wellknown?.display[0]?.text_color ?? defaultColor;
};
export function getAddressFields() {
return [
'addressLine1',
@@ -191,8 +179,11 @@ export const fieldItemIterator = (
fields: any[],
verifiableCredential: VerifiableCredential | Credential,
wellknown: any,
display: Display,
props: VCItemDetailsProps,
) => {
const fieldNameColor = display.getTextColor(Theme.Colors.DetailsLabel);
const fieldValueColor = display.getTextColor(Theme.Colors.Details);
return fields.map(field => {
const fieldName = getFieldName(
field,
@@ -204,6 +195,7 @@ export const fieldItemIterator = (
field,
wellknown,
props,
display,
props.verifiableCredentialData.vcMetadata.format,
);
if (
@@ -222,8 +214,8 @@ export const fieldItemIterator = (
key={field}
fieldName={fieldName}
fieldValue={fieldValue}
verifiableCredential={verifiableCredential}
wellknown={wellknown}
fieldNameColor={fieldNameColor}
fieldValueColor={fieldValueColor}
testID={field}
/>
</Row>
@@ -248,65 +240,87 @@ export const getMosipLogo = () => {
/**
*
* @param wellknown (either supportedCredential's wellknown or whole well known response of issuer)
* @param idType
* @returns id Type translations (Eg - National ID)
* @param credentialConfigurationId
* @returns credential type translations (Eg - National ID)
*
* supportedCredential's wellknown is passed from getActivityText after fresh download
* & all other consumers pass whole well known response of issuer
*/
export const getIdType = (
wellknown: CredentialTypes | IssuerWellknownResponse,
credentialConfigurationId: string | undefined = undefined,
export const getCredentialType = (
supportedCredentialsWellknown: CredentialTypes,
): string => {
if (
wellknown &&
wellknown['credential_configurations_supported'] === undefined &&
wellknown?.display
) {
const idTypeObj = wellknown.display.map((displayProps: any) => {
return {language: displayProps.locale, value: displayProps.name};
});
return getLocalizedField(idTypeObj);
} else if (wellknown && Object.keys(wellknown).length > 0) {
let supportedCredentialsWellknown;
wellknown = parseJSON(wellknown) as unknown as Object[];
if (!!!wellknown['credential_configurations_supported']) {
return i18n.t('VcDetails:nationalCard');
}
try {
if (!!credentialConfigurationId) {
supportedCredentialsWellknown = getMatchingCredentialIssuerMetadata(
wellknown,
credentialConfigurationId,
);
} else {
console.error(
'credentialConfigurationId not available for fetching the ID type',
);
throw new Error(
`invalid credential credentialConfigurationId - ${credentialConfigurationId} passed`,
);
}
} catch (error) {
console.error(
`error occurred while getting supported credential's ${credentialConfigurationId} wellknown`,
);
return i18n.t('VcDetails:nationalCard');
}
if (Object.keys(supportedCredentialsWellknown).length === 0) {
return i18n.t('VcDetails:nationalCard');
}
return getIdType(supportedCredentialsWellknown);
if (!!!supportedCredentialsWellknown) {
return i18n.t('VcDetails:identityCard');
}
if (supportedCredentialsWellknown['display']) {
const wellknownDisplayProperty = getDisplayObjectForCurrentLanguage(
supportedCredentialsWellknown.display,
);
return wellknownDisplayProperty.name;
}
if (supportedCredentialsWellknown.format === VCFormat.ldp_vc) {
const types = supportedCredentialsWellknown.credential_definition
.type as string[];
return types[1];
} else {
return i18n.t('VcDetails:nationalCard');
return i18n.t('VcDetails:identityCard');
}
};
export function DisplayName(props: VCItemContentProps): string | Object {
if (props.verifiableCredentialData.format === VCFormat.mso_mdoc) {
return props.credential['issuerSigned']['nameSpaces'][
'org.iso.18013.5.1'
].find(element => element.elementIdentifier === 'given_name').elementValue;
export const getCredentialTypeFromWellKnown = (
wellknown: IssuerWellknownResponse,
credentialConfigurationId: string | undefined = undefined,
): string => {
if (credentialConfigurationId !== undefined) {
const supportedCredentialsWellknown = getMatchingCredentialIssuerMetadata(
wellknown,
credentialConfigurationId,
);
return getCredentialType(supportedCredentialsWellknown);
}
console.error(
'credentialConfigurationId not available for fetching the Credential type',
);
throw new Error(
`Invalid credentialConfigurationId - ${credentialConfigurationId} passed`,
);
};
export class Display {
private readonly textColor: string | undefined = undefined;
private readonly backgroundColor: {backgroundColor: string};
private readonly backgroundImage: string | undefined = undefined;
private defaultBackgroundColor = Theme.Colors.whiteBackgroundColor;
constructor(wellknown: any) {
const wellknownDisplayProperty = wellknown?.display
? getDisplayObjectForCurrentLanguage(wellknown.display)
: {};
if (!!!Object.keys(wellknownDisplayProperty).length) {
this.backgroundColor = {
backgroundColor: this.defaultBackgroundColor,
};
return;
}
const display = wellknownDisplayProperty as displayType;
this.backgroundColor = {
backgroundColor: display.background_color ?? this.defaultBackgroundColor,
};
this.backgroundImage = display.background_image;
this.textColor = display.text_color;
}
getTextColor(defaultColor: string): string {
return this.textColor ?? defaultColor;
}
getBackgroundColor(): {backgroundColor: string} {
return this.backgroundColor;
}
getBackgroundImage(defaultBackgroundImage: string) {
return this.backgroundImage ?? defaultBackgroundImage;
}
return props.credential?.credentialSubject['fullName'];
}

View File

@@ -1,16 +1,33 @@
import testIDProps from '../shared/commonUtil';
import {getTextColor} from './VC/common/VCUtils';
import {Display} from './VC/common/VCUtils';
import VerifiedIcon from './VerifiedIcon';
import {Row, Text} from './ui';
import {Theme} from './ui/styleUtils';
import React from 'react';
import {useTranslation} from 'react-i18next';
import PendingIcon from './PendingIcon';
import {VCMetadata} from '../shared/VCMetadata';
export const VCVerification: React.FC = ({wellknown, isVerified}: any) => {
export const VCVerification: React.FC<VCVerificationProps> = ({
vcMetadata,
display,
}) => {
const {t} = useTranslation('VcDetails');
const statusText = isVerified ? t('valid') : t('pending');
const statusIcon = isVerified ? <VerifiedIcon /> : <PendingIcon />;
const statusText = vcMetadata.isVerified
? vcMetadata.isExpired
? t('expired')
: t('valid')
: t('pending');
const statusIcon = vcMetadata.isVerified ? (
vcMetadata.isExpired ? (
<PendingIcon />
) : (
<VerifiedIcon />
)
) : (
<PendingIcon />
);
return (
<Row
{...testIDProps('verified')}
@@ -21,7 +38,7 @@ export const VCVerification: React.FC = ({wellknown, isVerified}: any) => {
{statusIcon}
<Text
testID="verificationStatus"
color={getTextColor(wellknown, Theme.Colors.Details)}
color={display.getTextColor(Theme.Colors.Details)}
style={Theme.Styles.verificationStatus}>
{statusText}
</Text>
@@ -29,3 +46,8 @@ export const VCVerification: React.FC = ({wellknown, isVerified}: any) => {
</Row>
);
};
export interface VCVerificationProps {
vcMetadata: VCMetadata;
display: Display;
}

View File

@@ -71,6 +71,12 @@ export const getKebabMenuOptions = props => {
if (isMosipVC(props.vcMetadata.issuer)) {
vcActionsList.splice(2, 0, shareWithSelfieOption, VCActivationOption);
}
if (props.vcMetadata.isExpired) {
const indexOfActivation = vcActionsList.indexOf(VCActivationOption);
if (indexOfActivation !== -1) {
vcActionsList.splice(indexOfActivation, 1);
}
}
}
return vcActionsList;

View File

@@ -9,7 +9,7 @@ import {getDisplayObjectForCurrentLanguage} from '../../shared/openId4VCI/Utils'
import {CredentialTypes} from '../../machines/VerifiableCredential/VCMetaMachine/vc';
export const CredentialType: React.FC<CredentialTypeProps> = props => {
const selectedIssuerDisplayObject = props.item.display
const selectedIssuerDisplayObject = props.item.display?.length
? getDisplayObjectForCurrentLanguage(props.item.display)
: {};

View File

@@ -14,7 +14,11 @@ export const Error: React.FC<ErrorProps> = props => {
const errorContent = () => {
return (
<Fragment>
<View style={[{alignItems: 'center'}, props.customStyles]}>
<View
style={[
{alignItems: 'center', marginHorizontal: 1},
props.customStyles,
]}>
<View>
<Row
align="center"

View File

@@ -11,6 +11,7 @@ import {COPILOT_HEIGHT, isIOS} from '../../../shared/constants';
import Constants from 'expo-constants';
import HomeScreenLogo from '../../../assets/InjiHomeLogo.svg';
import InjiLogoSmall from '../../../assets/InjiLogo.svg';
import i18next from '../../../i18n';
const Colors = {
Black: '#000000',
Zambezi: '#5F5F5F',
@@ -416,8 +417,8 @@ export const DefaultTheme = {
width: 191.58,
height: 28,
},
injiHomeLogo:{
marginLeft:-24
injiHomeLogo: {
marginLeft: -24,
},
logo: {
height: 35,
@@ -1747,6 +1748,71 @@ export const DefaultTheme = {
},
}),
AboutInjiScreenStyle: StyleSheet.create({
titleStyle: {
paddingTop: 3,
},
appIdTitleStyle: {
maxWidth: 110,
paddingTop: i18next.language == 'kn' || i18next.language == 'hi' ? 5 : 0,
},
appIdTextStyle: {
paddingTop: i18next.language == 'hi' ? 2 : 0,
},
containerStyle: {
flex: 1,
padding: 12,
},
innerContainerStyle: {
maxWidth: Dimensions.get('window').width * 0.94,
minHeight: Dimensions.get('window').height * 0.1,
marginTop: 7,
},
clickHereTextStyle: {
maxWidth: 150,
paddingTop: 3,
},
injiVersionContainerStyle: {
paddingBottom: 15,
},
injiVersionTitle: {
paddingTop: 3,
},
injiVersionText: {
paddingTop: 3,
maxWidth: 250,
},
tuvaliVerisonStyle: {
paddingTop: 3,
paddingBottom: 12,
marginTop: 3,
},
horizontalLineStyle: {
backgroundColor: 'lightgrey',
width: '90%',
height: 1,
},
poweredByTextStyle: {
paddingTop: 15,
maxWidth: 250,
},
aboutDetailstextStyle: {
color: Colors.Black,
fontSize: 18,
margin: 7,
lineHeight: 18,
paddingTop: 5,
},
moreDetailstextStyle: {
color: Colors.Black,
fontSize: 18,
margin: 7,
lineHeight: 18,
maxWidth: 150,
paddingTop: 10,
},
}),
ICON_SMALL_SIZE: 16,
ICON_MID_SIZE: 22,
ICON_LARGE_SIZE: 33,

View File

@@ -11,6 +11,7 @@ import {COPILOT_HEIGHT, isIOS} from '../../../shared/constants';
import Constants from 'expo-constants';
import HomeScreenLogo from '../../../assets/Inji_Home_Logo.svg';
import InjiLogoSmall from '../../../assets/InjiLogo.svg';
import i18next from '../../../i18n';
const Colors = {
Black: '#231F20',
@@ -421,8 +422,8 @@ export const PurpleTheme = {
width: 105,
height: 40,
},
injiHomeLogo:{
marginLeft:0
injiHomeLogo: {
marginLeft: 0,
},
logo: {
height: 35,
@@ -1753,6 +1754,71 @@ export const PurpleTheme = {
},
}),
AboutInjiScreenStyle: StyleSheet.create({
titleStyle: {
paddingTop: 3,
},
appIdTitleStyle: {
maxWidth: 110,
paddingTop: i18next.language == 'kn' || i18next.language == 'hi' ? 5 : 0,
},
appIdTextStyle: {
paddingTop: i18next.language == 'hi' ? 2 : 0,
},
containerStyle: {
flex: 1,
padding: 12,
},
innerContainerStyle: {
maxWidth: Dimensions.get('window').width * 0.94,
minHeight: Dimensions.get('window').height * 0.1,
marginTop: 7,
},
clickHereTextStyle: {
maxWidth: 150,
paddingTop: 3,
},
injiVersionContainerStyle: {
paddingBottom: 15,
},
injiVersionTitle: {
paddingTop: 3,
},
injiVersionText: {
paddingTop: 3,
maxWidth: 250,
},
tuvaliVerisonStyle: {
paddingTop: 3,
paddingBottom: 12,
marginTop: 3,
},
horizontalLineStyle: {
backgroundColor: 'lightgrey',
width: '90%',
height: 1,
},
poweredByTextStyle: {
paddingTop: 15,
maxWidth: 250,
},
aboutDetailstextStyle: {
color: Colors.Black,
fontSize: 18,
margin: 7,
lineHeight: 18,
paddingTop: 5,
},
moreDetailstextStyle: {
color: Colors.Black,
fontSize: 18,
margin: 7,
lineHeight: 18,
maxWidth: 150,
paddingTop: 10,
},
}),
ICON_SMALL_SIZE: 16,
ICON_MID_SIZE: 22,
ICON_LARGE_SIZE: 33,

View File

@@ -8,27 +8,26 @@ Inji Automation is a mobile automation framework designed for iOS and Android pl
To set up Appium for use with this framework, please follow the installation instructions provided in the [Appium documentation](https://appium.io/docs/en/2.2/quickstart/install/).
## Build
## Pre-requisites
Ensure the following software is installed on the machine from where the automation tests will be executed:
1. Build the JAR file: `mvn clean package -DskipTests=true`
2. The JAR file will be generated in the `target` directory.
3. For running tests on Device Farm, use the JAR file with dependencies (`zip-with-dependencies`).
1. The project requires JDK 21
## Configurations
1. Update `Config>>kernal.properties` to modify the environment settings.
2. Update the following keys in `src/main/java>>inji.utils>>TestDataReader.java`:
- `uin`
- `uin2`
- `aid` for environment changes.
3. Update `Config>>config.properties` with the following values:
- `nodePath`
- `appiumServerExecutable`
4. Update `Config>>DesiredCapabilies.json` with the following keys:
- `appium:udid`
- `appium:app`
5. If the run is on Device Farm, set `isDeviceFarmRun` to `true`.
6. To run tests in an IDE, set `isDeviceFarmRun` to `false` and execute the `testng.xml` file.
1. update `resourec/uin.json`,`resourec/Vid.json`,`resourec/aid.json` file as per the uin and vids being used.
2. Update utils/TestDataReader to include updates for FullName, uin, idType, gender, phoneNumber, dateOfBirth, and externalEmail as they are used during creation.
## BrowserStack
1. singup to browserStack & get the userName and accessKey from home page on browserStack.
2. Upload app on browserStack it will return 'bs://<app-id>', update the same appid in iosConfig.yml/androidconfig.yml.
2. update the userName and accessKey from iosConfig.yml/androidconfig.yml.
3. update the device from tag platforms from https://www.browserstack.com/list-of-browsers-and-platforms/automate (Windows, Mac).
4. Open command prompt and change directory by using command 'cd ../injitest'.
5. Hit the command mvn clean test -DtestngXmlFile=androidSanity.xml -Dbrowserstack.config="androidConfig.yml", for running the sanity for android.
6. Hit the command mvn clean test -DtestngXmlFile=iosSanity.xml -Dbrowserstack.config="iosConfig.yml", for running the sanity for ios.
7. Hit the command mvn clean test -DtestngXmlFile=iosRegression.xml -Dbrowserstack.config="iosConfig.yml", for running the regression for ios.
8. Hit the command mvn clean test -DtestngXmlFile=androidRegression.xml -Dbrowserstack.config="androidConfig.yml", for running the Regression for android.
## Reports

View File

@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="All Test Suite">
<!--<listeners>
<listener class-name="inji.utils.SuiteListener" />
</listeners>-->
<suite-files>
<suite-file path="androidSanity.xml"/>
</suite-files>
<test verbose="2" preserve-order="true" name="android">
<classes>
<classes>
<class name="androidTestCases.AboutInjiTest">
<methods>
<include name="copyAppId"/>
@@ -28,11 +28,6 @@
<include name="changeLanguageToTamilAndcheckInjiTour"/>
<include name="changeLanguageToKannadAndcheckInjiTour"/>
<include name="downloadVcAndChnageLangaugeVerifyVcViaSunbird"/>
<include name="changeLanguageToHindiAndVerifyEsignetPage"/>
<include name="changeLanguageToTamilAndVerifyEsignetPage"/>
<include name="changeLanguageToKannadaAndVerifyEsignetPage"/>
<include name="changeLanguageToArabicAndVerifyEsignetPage"/>
<include name="changeLanguageToFillipineAndVerifyEsignetPage"/>
</methods>
</class>
<class name="androidTestCases.DeletingVcTest">
@@ -98,7 +93,7 @@
<methods>
<include name="downloadAndVerifyVcUsingUinViaEsignet"/>
<include name="downloadAndVerifyVcUsingVidViaEsignet"/>
<!-- <include name="downloadMultipleVcViaEsignet"/> invalid testcase-->
<!-- <include name="downloadMultipleVcViaEsignet"/> invalid testcase-->
<include name="downloadMultipleCardsAndVerifySearch"/>
<include name="downloadCardsAndVerifySearch"/>
</methods>
@@ -149,10 +144,10 @@
<methods>
<include name="copyAppId"/>
<include name="verifyAppId"/>
<!-- <include name="verifyTuvaliVersion"/> invalid testcase-->
<!-- <include name="verifyTuvaliVersion"/> invalid testcase-->
</methods>
</class>
</classes>
</classes>
</test>
</suite>

View File

@@ -1,6 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="esignetAndSunbird">
<suite name="androidSanity">
<listeners>
<listener class-name="inji.utils.SuiteListener"/>
</listeners>
<test verbose="2" preserve-order="true" name="android">
<classes>
<class name="androidTestCases.UnlockWithPasscodeTest">

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="esignet">
<test verbose="2" preserve-order="true" name="android">
<classes>
<class name="androidTestCases.ChangeLanguageTest">
<methods>
<include name="changeLanguageToHindiAndVerifyEsignetPage"/>
<include name="changeLanguageToTamilAndVerifyEsignetPage"/>
<include name="changeLanguageToKannadaAndVerifyEsignetPage"/>
<include name="changeLanguageToArabicAndVerifyEsignetPage"/>
<include name="changeLanguageToFillipineAndVerifyEsignetPage"/>
</methods>
</class>
</classes>
</test>
</suite>

View File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="esignet">
<suite-files>
<suite-file path="iosSanity.xml"/>
</suite-files>
<test verbose="2" preserve-order="true" name="ios">
<classes>
<class name="iosTestCases.ChangeLanguageTest">
<methods>
<include name="changeLanguageToHindiAndVerifyEsignetPage"/>
<include name="changeLanguageToTamilAndVerifyEsignetPage"/>
<include name="changeLanguageToKannadaAndVerifyEsignetPage"/>
<include name="changeLanguageToArabicAndVerifyEsignetPage"/>
<include name="changeLanguageToFillpinoAndVerifyEsignetPage"/>
<include name="changeLanguageToKannadaToEnglishAndVerifyEsignetPage"/>
</methods>
</class>
</classes>
</test>
</suite>

View File

@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="All Test Suite">
<!-- <listeners>
<listener class-name="inji.utils.SuiteListener" />
</listeners>-->
<test verbose="2" preserve-order="true" name="android">
<classes>
<suite-files>
<suite-file path="iosSanity.xml"/>
</suite-files>
<test verbose="2" preserve-order="true" name="ios">
<classes>
<class name="iosTestCases.AboutInjiTest">
<methods>
<include name="copyAppId"/>
@@ -27,12 +27,6 @@
<include name="changeLanguageToTamilAndcheckInjiTour"/>
<include name="changeLanguageToKannadAndcheckInjiTour"/>
<include name="downloadVcAndChnageLangaugeVerifyVcViaSunbird"/>
<include name="changeLanguageToHindiAndVerifyEsignetPage"/>
<include name="changeLanguageToTamilAndVerifyEsignetPage"/>
<include name="changeLanguageToKannadaAndVerifyEsignetPage"/>
<include name="changeLanguageToArabicAndVerifyEsignetPage"/>
<include name="changeLanguageToFillpinoAndVerifyEsignetPage"/>
<include name="changeLanguageToKannadaToEnglishAndVerifyEsignetPage"/>
</methods>
</class>
<class name="iosTestCases.DeletingVcTest">
@@ -127,8 +121,8 @@
<include name="verifyAppId"/>
</methods>
</class>
</classes>
</test>
</classes>
</test>
</suite>
<!--<suite name="All Test Suite">

View File

@@ -1,6 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="EsignetAndSunbird">
<suite name="iosSanity">
<listeners>
<listener class-name="inji.utils.SuiteListener"/>
</listeners>
<test verbose="2" preserve-order="true" name="ios">
<classes>
<class name="iosTestCases.UnlockWithPasscodeTest">

View File

@@ -23,6 +23,9 @@ public class AddNewCardPage extends BasePage{
@iOSXCUITFindBy(accessibility = "issuerHeading-Mosip")
private WebElement downloadViaEsignet;
@AndroidFindBy(accessibility = "issuerHeading-MockCertify")
@iOSXCUITFindBy(accessibility = "issuerHeading-MockCertify")
private WebElement downloadViaMockCertify;
@iOSXCUITFindBy(accessibility = "Continue")
private WebElement continueButton;
@@ -57,6 +60,10 @@ public class AddNewCardPage extends BasePage{
@iOSXCUITFindBy(accessibility = "credentialTypeHeading-MosipVerifiableCredential")
private WebElement credentialTypeHeadingMOSIPVerifiableCredential;
@AndroidFindBy(accessibility = "credentialTypeHeading-MockVerifiableCredential_mdoc")
@iOSXCUITFindBy(accessibility = "credentialTypeHeading-MockVerifiableCredential_mdoc")
private WebElement credentialTypeHeadingMockVerifiableCredential_mdoc;
public AddNewCardPage(AppiumDriver driver) {
super(driver);
}
@@ -101,6 +108,10 @@ public class AddNewCardPage extends BasePage{
return this.isElementDisplayed(downloadViaEsignet);
}
public boolean isDownloadViaMockCertifyDisplayed() {
return this.isElementDisplayed(downloadViaMockCertify);
}
public boolean isDownloadViaEsignetDisplayedInHindi() {
return this.isElementDisplayed(downloadViaEsignet);
}
@@ -123,6 +134,20 @@ public class AddNewCardPage extends BasePage{
return new EsignetLoginPage(driver);
}
public MockCertifyLoginPage clickOnDownloadViaMockCertify(){
clickOnElement(downloadViaMockCertify);
try {
Thread.sleep(3000);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
if(isElementDisplayed(credentialTypeHeadingMockVerifiableCredential_mdoc)) {
clickOnElement(credentialTypeHeadingMockVerifiableCredential_mdoc);
}
return new MockCertifyLoginPage(driver);
}
public void clickOnContinueButtonInSigninPopupIos(){
if(isElementDisplayed(continueButton))
clickOnElement(continueButton);

View File

@@ -99,6 +99,10 @@ public class DetailedVcViewPage extends BasePage{
@iOSXCUITFindBy(accessibility = "KebabIcon")
public WebElement moreOptionsButton;
@AndroidFindBy(accessibility = "keyTypeVcDetailViewValue")
@iOSXCUITFindBy(accessibility = "keyTypeVcDetailViewValue")
public WebElement keyTypeVcDetailViewValue;
public DetailedVcViewPage(AppiumDriver driver) {
super(driver);
}
@@ -218,6 +222,8 @@ public class DetailedVcViewPage extends BasePage{
}
clickOnElement(moreOptionsButton);
}
public boolean isKeyTypeVcDetailViewValueDisplayed() {
return isElementDisplayed(keyTypeVcDetailViewValue);
}
}

View File

@@ -88,6 +88,7 @@ public class EsignetLoginPage extends BasePage {
private WebElement credentialTypeHeadingMOSIPVerifiableCredential;
public EsignetLoginPage(AppiumDriver driver) {
super(driver);
}
@@ -116,7 +117,6 @@ public class EsignetLoginPage extends BasePage {
if(isElementDisplayed(esignetLoginButton)) {
clickOnElement(esignetLoginButton);
}
}
public OtpVerificationPage setEnterIdTextBox(String uinOrVid) {

View File

@@ -267,7 +267,7 @@ public class HomePage extends BasePage {
public DetailedVcViewPage openDetailedVcView(String name) {
By fullName = By.xpath("//*[contains(@value,'" + name + "') or contains(@text,'" + name + "')]");
clickOnElement(fullNameValue);
clickOnElement(fullName);
return new DetailedVcViewPage(driver);
}

View File

@@ -0,0 +1,106 @@
package inji.pages;
import inji.utils.IosUtil;
import io.appium.java_client.AppiumDriver;
import io.appium.java_client.pagefactory.AndroidFindBy;
import io.appium.java_client.pagefactory.iOSXCUITFindBy;
import org.openqa.selenium.WebElement;
import java.util.Arrays;
import java.util.List;
public class KeyManagementPage extends BasePage {
@AndroidFindBy(accessibility = "7done")
@iOSXCUITFindBy(accessibility = "7done")
private WebElement stepCountButton;
@AndroidFindBy(accessibility = "saveKeyOrderingPreference")
@iOSXCUITFindBy(accessibility = "saveKeyOrderingPreference")
private WebElement saveKeyOrderingPreference;
@AndroidFindBy(accessibility = "keyOrderingSuccessText")
@iOSXCUITFindBy(accessibility = "keyOrderingSuccessText")
private WebElement keyOrderingSuccessText;
@AndroidFindBy(accessibility = "arrow-left")
@iOSXCUITFindBy(accessibility = "arrow-left")
private WebElement arrowleftButton;
@AndroidFindBy(xpath = "(//android.widget.TextView[@resource-id=\"iconIcon\"])[6]")
@iOSXCUITFindBy(xpath = "(//XCUIElementTypeOther[@name=\"RSA \uE25D\"])[2]")
private WebElement RSAText;
@AndroidFindBy(xpath = "(//android.widget.TextView[@resource-id=\"iconIcon\"])[3]")
@iOSXCUITFindBy(xpath = "(//XCUIElementTypeOther[@name=\"ED25519 \uE25D\"])[2]")
private WebElement ED25519Text;
@AndroidFindBy(xpath = "//android.widget.TextView[@resource-id=\"listItemTitle\" and @text=\"ECC R1\"]")
@iOSXCUITFindBy(xpath = "(//XCUIElementTypeOther[@name=\"ED25519 \uE25D\"])[2]")
private WebElement ECCR1Text;
@AndroidFindBy(accessibility = "keyTypeVcDetailViewValue")
@iOSXCUITFindBy(accessibility = "saveKeyOrderingPreference")
private WebElement keyTypeVcDetailViewValue;
public KeyManagementPage(AppiumDriver driver) {
super(driver);
}
BasePage basePage = new BasePage(driver);
public boolean isDoneButtonDisplayed() {
return this.isElementDisplayed(stepCountButton);
}
public void clickOnDoneButton() {
clickOnElement (stepCountButton);
}
public WebElement getTheCoordinatesForRSA(){
RSAText.isDisplayed();
return RSAText;
}
public WebElement getTheCoordinatesED25519Text(){
ECCR1Text.isDisplayed();
return ECCR1Text;
}
public WebElement getTheCoordinatesECCR1TextText(){
ECCR1Text.isDisplayed();
return ECCR1Text;
}
public void clickOnSaveKeyOrderingPreferenceButton() {
clickOnElement (saveKeyOrderingPreference);
}
public void clickOnArrowleftButton() {
clickOnElement (arrowleftButton);
}
public boolean iskeyOrderingSuccessTextMessageDisplayed() {
return this.isElementDisplayed(keyOrderingSuccessText);
}
public String getPKeyTypeVcDetailViewValueSunbirdCard() {
IosUtil.scrollToElement(driver,100,800,100,200);
basePage.retryToGetElement(keyTypeVcDetailViewValue);
return this.getTextFromLocator(keyTypeVcDetailViewValue);
}
public boolean compareListOfKeys() {
List<String> stringList = Arrays.asList("ED25519", "ES256K", "ES256", "RS256");
String str = getPKeyTypeVcDetailViewValueSunbirdCard();
for (String key : stringList) {
if (str.equals(key)) {
return true;
}
}
return false;
}
}

View File

@@ -0,0 +1,230 @@
package inji.pages;
import io.appium.java_client.AppiumDriver;
import io.appium.java_client.HidesKeyboard;
import io.appium.java_client.pagefactory.AndroidFindBy;
import io.appium.java_client.pagefactory.iOSXCUITFindBy;
import org.openqa.selenium.WebElement;
public class MockCertifyLoginPage extends BasePage {
@iOSXCUITFindBy(iOSClassChain = "**/XCUIElementTypeStaticText[`label == \"“Inji” Wants to Use “mosip.net” to Sign In\"`]")
private WebElement iosSignInPermissionPopup;
@iOSXCUITFindBy(accessibility = "Continue")
private WebElement iosContinueButton;
@AndroidFindBy(xpath = "//*[contains(@text,'Login with OTP')]")
@iOSXCUITFindBy(accessibility = "Login with OTP")
private WebElement esignetLoginButton;
@AndroidFindBy(xpath = "//*[contains(@text,'Login with e-Signet')]")
@iOSXCUITFindBy(xpath = "//*[contains(@text,'Login with e-Signet')]")
private WebElement esignetLoginHeader;
@AndroidFindBy(xpath = "//*[contains(@text,'Please enter your UIN/VID')]")
@iOSXCUITFindBy(xpath = "//*[contains(@text,'Please enter your UIN/VID'')]")
private WebElement enterYourVidTextHeader;
@AndroidFindBy(uiAutomator = "UiSelector().className(\"android.widget.EditText\").instance(0)")
@iOSXCUITFindBy(className = "XCUIElementTypeTextField")
private WebElement enterIdTextBox;
@AndroidFindBy(xpath = "//android.widget.Button[@text=\"Get OTP\"]")
@iOSXCUITFindBy(accessibility = "Get OTP")
private WebElement getOtpButton;
@AndroidFindBy(uiAutomator = "new UiSelector().className(\"android.widget.Button\").instance(1)")
@iOSXCUITFindBy(accessibility = "Verify")
private WebElement verifyButton;
@AndroidFindBy(xpath = "//*[contains(@text,'OTP has been sent to your registered Mobile Number')]")
@iOSXCUITFindBy(xpath = "//*[contains(@text,'OTP has been sent to your registered Mobile Number')]")
private WebElement otpSendMessage;
@AndroidFindBy(className = "android.view.ViewGroup")
private WebElement redirectingPage;
@AndroidFindBy(accessibility = "progressingLogo")
private WebElement progressingLogo;
@AndroidFindBy(accessibility = "loaderTitle")
private WebElement loadingPageHeader;
@iOSXCUITFindBy(accessibility = "Done")
private WebElement DoneButton;
@AndroidFindBy(accessibility = "loaderSubTitle")
private WebElement settingUpTextOrDownloadingCredentials;
@AndroidFindBy(xpath = "//*[@text=\"OTP is invalid\"]")
private WebElement invalidOtpText;
@AndroidFindBy(uiAutomator = "UiSelector().className(\"android.widget.TextView\").instance(1)")
@iOSXCUITFindBy(xpath = "(//XCUIElementTypeStaticText)[5]")
private WebElement loginTextHeader;
@AndroidFindBy(uiAutomator = "UiSelector().className(\"android.widget.TextView\").instance(2)")
@iOSXCUITFindBy(xpath = "(//XCUIElementTypeStaticText)[6]")
private WebElement pleaseEnterUinHeaderText;
@AndroidFindBy(uiAutomator = "UiSelector().className(\"android.widget.TextView\").instance(5)")
@iOSXCUITFindBy(xpath = "(//XCUIElementTypeStaticText)[9]")
private WebElement dontHaveAccountText;
@AndroidFindBy(uiAutomator = "UiSelector().className(\"android.widget.TextView\").instance(6)")
@iOSXCUITFindBy(xpath = "(//XCUIElementTypeStaticText)[10]")
private WebElement signUpwithUnifiedLoginText;
@AndroidFindBy(accessibility = "Close tab")
@iOSXCUITFindBy(xpath ="//XCUIElementTypeButton[@name=\"Cancel\"]")
private WebElement CloseTab;
@AndroidFindBy(accessibility = "credentialTypeHeading-MOSIPVerifiableCredential")
@iOSXCUITFindBy(accessibility = "credentialTypeHeading-MOSIPVerifiableCredential")
private WebElement credentialTypeHeadingMOSIPVerifiableCredential;
public MockCertifyLoginPage(AppiumDriver driver) {
super(driver);
}
public boolean isLoadingPageTextLoaded() {
return this.isElementDisplayed(loadingPageHeader);
}
public boolean isSettingUpTextDisplayed() {
return this.isElementDisplayed(settingUpTextOrDownloadingCredentials);
}
public boolean isDownloadingCredentialsTextDisplayed() {
return this.isElementDisplayed(settingUpTextOrDownloadingCredentials);
}
public boolean isOtpHasSendMessageDisplayed() {
return this.isElementDisplayed(otpSendMessage);
}
public boolean isEsignetLoginPageDisplayed() {
return this.isElementDisplayed(esignetLoginHeader);
}
public void clickOnEsignetLoginWithOtpButton() {
if(isElementDisplayed(esignetLoginButton)) {
clickOnElement(esignetLoginButton);
}
}
public OtpVerificationPage setEnterIdTextBox(String uinOrVid) {
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
sendKeysToTextBox(enterIdTextBox, uinOrVid);
return new OtpVerificationPage(driver);
}
public boolean isEnterYourVidTextDisplayed() {
return this.isElementDisplayed(enterYourVidTextHeader);
}
public boolean isProgressingLogoDisplayed() {
return redirectingPage.isDisplayed();
}
public void clickOnGetOtpButton() {
clickOnElement(getOtpButton);
}
public void clickOnVerifyButton() {
((HidesKeyboard) driver).hideKeyboard();
clickOnElement(verifyButton);
}
public void clickOnVerifyButtonIos() {
clickOnElement(verifyButton);
}
public boolean isInvalidOtpMessageDisplayed() {
return this.isElementDisplayed(invalidOtpText);
}
public boolean verifyLanguageLoginHeaderTextDisplayed(String language){
String actualText = getTextFromLocator(loginTextHeader);
switch (language) {
case "English":
boolean isEnglishMatch = (actualText.equalsIgnoreCase("Login")==true) ? true : false;
return isEnglishMatch ;
case "Tamil":
boolean isTamilMatch = (actualText.equalsIgnoreCase("eSignet மூலம் உள்நுழையவும்")==true) ? true : false;
return isTamilMatch ;
case "Kannada":
boolean isKannadaMatch = (actualText.equalsIgnoreCase("ಇಸಿಗ್ನೆಟ್ ಮೂಲಕ ಲಾಗಿನ್ ಮಾಡಿ")==true) ? true : false;
return isKannadaMatch ;
case "Hindi":
boolean isHindiMatch = (actualText.equalsIgnoreCase("ईसिग्नेट से लॉगिन करें")==true) ? true : false;
return isHindiMatch ;
case "HindiIos":
boolean isHindiMatchIos = (actualText.equalsIgnoreCase("ईसिग्नेट से लॉगिन करें")==true) ? true : false;
return isHindiMatchIos ;
case "Arabic":
boolean isArabicMatch = (actualText.equalsIgnoreCase("تسجيل الدخول باستخدام eSignet")==true) ? true : false;
return isArabicMatch ;
}
return false;
}
public boolean verifyLanguagePleaseEnterUinHeaderTextDisplayed(String language){
String actualText = getTextFromLocator(pleaseEnterUinHeaderText);
switch (language) {
case "English":
boolean isEnglishMatch = (actualText.equalsIgnoreCase("Please enter your UIN/VID")==true) ? true : false;
return isEnglishMatch ;
case "Tamil":
boolean isTamilMatch = (actualText.equalsIgnoreCase("உங்கள் UIN/VIDஐ உள்ளிடவும்")==true) ? true : false;
return isTamilMatch ;
case "TamilIos":
boolean isTamilMatchIos = (actualText.equalsIgnoreCase("உங்கள் UIN/VIDஐ உள்ளிடவும்")==true) ? true : false;
return isTamilMatchIos ;
case "Kannada":
boolean isKannadaMatch = (actualText.equalsIgnoreCase("ದಯವಿಟ್ಟು ನಿಮ್ಮ UIN/VID ಅನ್ನು ನಮೂದಿಸಿ")==true) ? true : false;
return isKannadaMatch ;
case "Hindi":
boolean isHindiMatch = (actualText.equalsIgnoreCase("कृपया अपना यूआईएन/वीआईडी \u200B\u200Bदर्ज करें")==true) ? true : false;
return isHindiMatch ;
case "HindiIos":
boolean isHindiMatchIos = (actualText.equalsIgnoreCase("अपना यूआईएन या वीआईडी \u200B\u200Bदर्ज करें")==true) ? true : false;
return isHindiMatchIos ;
case "Arabic":
boolean isArabicMatch = (actualText.equalsIgnoreCase("الرجاء إدخال UIN/VID الخاص بك")==true) ? true : false;
return isArabicMatch ;
}
return false;
}
public void clickOnCloseButton() {
clickOnElement(CloseTab);
}
public String getText(){
System.out.println(getTextFromLocator(enterIdTextBox));
return getTextFromLocator(enterIdTextBox);
}
public void clickOnCredentialTypeHeadingMOSIPVerifiableCredential() {
try {
Thread.sleep(2000);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
if (isElementDisplayed(credentialTypeHeadingMOSIPVerifiableCredential)) {
clickOnElement(credentialTypeHeadingMOSIPVerifiableCredential);
}
}
}

View File

@@ -61,8 +61,8 @@ public class OtpVerificationPage extends BasePage {
private WebElement waitPopupButton;
@AndroidFindBy(uiAutomator = "new UiSelector().textContains(\"OTP is invalid\")")
@iOSXCUITFindBy(accessibility = "OTP is invalid")
@AndroidFindBy(uiAutomator = "new UiSelector().textContains(\"Please enter valid OTP.\")")
@iOSXCUITFindBy(accessibility = "Please enter valid OTP.")
private WebElement invalidOtpMessageforEsignet;
public OtpVerificationPage(AppiumDriver driver) {

View File

@@ -52,7 +52,7 @@ public class SettingsPage extends BasePage {
@AndroidFindBy(xpath = "//*[contains(@text,'Wika')]")
@iOSXCUITFindBy(iOSClassChain = "**/XCUIElementTypeOther[`label == \"\uE037 Wika \uE5CC\"`][1]")
@iOSXCUITFindBy(accessibility = "languageTitle")
private WebElement wikaButton;
@AndroidFindBy(uiAutomator = "new UiSelector().resourceId(\"listItemTitle\")")
@@ -99,6 +99,9 @@ public class SettingsPage extends BasePage {
@AndroidFindBy(accessibility = "newLabel")
private WebElement newlable;
@AndroidFindBy(accessibility = "keyManagement")
private WebElement keyManagement;
public SettingsPage(AppiumDriver driver) {
super(driver);
@@ -245,4 +248,8 @@ public class SettingsPage extends BasePage {
return getTextFromLocator(receiveCardText);
}
public KeyManagementPage clickOnKeyManagement() {
clickOnElement(keyManagement);
return new KeyManagementPage(driver);
}
}

View File

@@ -198,6 +198,8 @@ public class SharePage extends BasePage {
public void clickOnDontAllowCameraAccessButton(){
if(isElementDisplayed(cameraDontAllowAccessPopup))
clickOnElement(cameraDontAllowAccessPopup);
}
public boolean isCameraAccessLostPageLoaded() {

View File

@@ -39,7 +39,7 @@ public class SunbirdLoginPage extends BasePage {
@iOSXCUITFindBy(xpath = "//XCUIElementTypeStaticText[@name=\"January 2024\"]")
private WebElement January2024;
@AndroidFindBy(xpath = "//android.widget.Button[@resource-id=\"verify_form\"]")
@AndroidFindBy(xpath = "//*[@resource-id=\"verify_form\"]")
@iOSXCUITFindBy(iOSClassChain = "**/XCUIElementTypeButton[`name == \"Login\"`]")
private WebElement loginButton;
@@ -151,6 +151,15 @@ public class SunbirdLoginPage extends BasePage {
@iOSXCUITFindBy(accessibility = "6done")
private WebElement doneButton;
@AndroidFindBy(accessibility = "keyTypeVcDetailViewValue")
@iOSXCUITFindBy(accessibility = "keyTypeVcDetailViewValue")
private WebElement keyTypeVcDetailViewValue;
@AndroidFindBy(xpath = "//*[@text=\"Login failed, please enter correct credentials\"]")
@iOSXCUITFindBy(xpath = "//*[@text=\"Login failed, please enter correct credentials\"]")
private WebElement LoginFailedDueTOInValidCredentials;
public SunbirdLoginPage(AppiumDriver driver) {
super(driver);
}

View File

@@ -1,9 +1,15 @@
package inji.utils;
import io.appium.java_client.AppiumDriver;
import io.appium.java_client.PerformsTouchActions;
import io.appium.java_client.android.AndroidTouchAction;
import io.appium.java_client.ios.IOSTouchAction;
import io.appium.java_client.touch.LongPressOptions;
import io.appium.java_client.touch.offset.ElementOption;
import org.openqa.selenium.Dimension;
import org.openqa.selenium.Point;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.interactions.Action;
import org.openqa.selenium.interactions.Pause;
import org.openqa.selenium.interactions.PointerInput;
import org.openqa.selenium.interactions.Sequence;
@@ -24,6 +30,43 @@ public class IosUtil {
}
public static void swipeOrScroll(AppiumDriver driver) {
Dimension size = driver.manage().window().getSize();
int startX = 68;
int startY = 927;
int endX = startX;
int endY = 474;
PointerInput finger1 = new PointerInput(PointerInput.Kind.TOUCH, "finger1");
Sequence sequence = new Sequence(finger1, 1)
.addAction(finger1.createPointerMove(Duration.ZERO, PointerInput.Origin.viewport(), startX, startY))
.addAction(finger1.createPointerDown(PointerInput.MouseButton.LEFT.asArg()))
.addAction(new Pause(finger1, Duration.ofMillis(200)))
.addAction(finger1.createPointerMove(Duration.ofMillis(100), PointerInput.Origin.viewport(), endX, endY))
.addAction(finger1.createPointerUp(PointerInput.MouseButton.LEFT.asArg()));
driver.perform(Collections.singletonList(sequence));
}
public static void dragAndDrop(AppiumDriver driver, WebElement eleToDrag, WebElement eleTODrop) {
AndroidTouchAction action = new AndroidTouchAction((PerformsTouchActions) driver);
action.longPress(LongPressOptions.longPressOptions()
.withElement(ElementOption.element(eleToDrag)))
.moveTo(ElementOption.element(eleTODrop))
.release()
.perform();
}
public static void dragAndDropForIos(AppiumDriver driver, WebElement eleToDrag, WebElement eleTODrop) {
IOSTouchAction action = new IOSTouchAction((PerformsTouchActions) driver);
action.longPress(LongPressOptions.longPressOptions()
.withElement(ElementOption.element(eleToDrag))
.withDuration(Duration.ofSeconds(1)))
.moveTo(ElementOption.element(eleTODrop))
.release()
.perform();
}
public static void tapOnElement(AppiumDriver driver, WebElement element) {
Point location = element.getLocation();
Dimension size = element.getSize();

View File

@@ -14,47 +14,21 @@ public class SuiteListener implements ISuiteListener {
@Override
public void onStart(ISuite suite) {
// No action needed for `onStart` in this case
}
@Override
public void onFinish(ISuite suite) {
System.out.println("Test Suite Finished!");
if (suite.getName().equalsIgnoreCase("androidSanity")|| suite.getName().equalsIgnoreCase("iosSanity")) {
boolean hasFailures = suite.getResults().values().stream()
.anyMatch(result -> result.getTestContext().getFailedTests().size() > 0);
for (ISuiteResult result : suite.getResults().values()) {
ITestContext context = result.getTestContext();
System.out.println("Failed Test Cases for Context: " + context.getName());
Iterator<ITestResult> failedTests = context.getFailedTests().getAllResults().iterator();
while (failedTests.hasNext()) {
ITestResult failedTest = failedTests.next();
ITestNGMethod method = failedTest.getMethod();
System.out.println(" - Failed Test: " + failedTest.getName());
System.out.println(" - Failed Method: " + method.getQualifiedName());
failedTestMethods.add(method);
if (hasFailures) {
System.exit(1);
System.out.println("Sanity suite has failures. Skipping Regression suite.");
} else {
System.out.println("Sanity suite passed. Proceeding with Regression suite.");
}
}
if (!failedTestMethods.isEmpty()) {
System.out.println("Rerunning failed test cases...");
TestNG rerunTestNG = new TestNG();
XmlSuite xmlSuite = new XmlSuite();
XmlTest xmlTest = new XmlTest(xmlSuite);
List<XmlClass> xmlClasses = new ArrayList<>();
for (ITestNGMethod method : failedTestMethods) {
XmlClass xmlClass = new XmlClass(method.getRealClass().getName());
xmlClass.getIncludedMethods().add(new XmlInclude(method.getMethodName()));
xmlClasses.add(xmlClass);
}
xmlTest.setXmlClasses(xmlClasses);
rerunTestNG.setXmlSuites(Collections.singletonList(xmlSuite));
rerunTestNG.run();
}
}
}

View File

@@ -0,0 +1,10 @@
package inji.utils;
import org.testng.ISuite;
import org.testng.ISuiteListener;
import org.testng.ITestResult;
public interface SuiteListeners extends ISuiteListener {
void onTestFailure(ISuite suite);
}

View File

@@ -34,8 +34,12 @@ public class TestDataReader {
return "1234567891";
case "fullName":
return "TEST_FULLNAMEeng";
case "fullNameForMobileDrivingLicense":
return "Joseph";
case "idType":
return "MOSIP National ID";
case "idTypeForMobileDrivingLicense":
return "Mobile Driving License";
case "gender":
return "MLEeng";
case "genderVidEsignet":
@@ -50,6 +54,8 @@ public class TestDataReader {
return "01/01/1996";
case "dateOfBirthForVidEsignet":
return "1996/01/01";
case "dateOfBirthForMobileDrivingLicense":
return "1994-11-06";
case "aid":
return UinGenerationUtil.getRandomAidData();
case "emailPassword":
@@ -66,6 +72,8 @@ public class TestDataReader {
return UinGenerationUtil.getRandomUin();
case "uin2":
return "2162743612";
case "MockVc":
return "1234567";
case "uin2FullName":
return "TEST_FULLNAMEeng";
case "newEnv":
@@ -100,6 +108,14 @@ public class TestDataReader {
return "Valid";
case "isDeviceFarmRun":
return "true";
case "ED25519Key":
return "ED25519";
case "ECCK1Key":
return "ECC K1";
case "ECCR1Key":
return "ECC R1";
case "RSAKey":
return "RSA";
default:
return "Key not found";
}

View File

@@ -0,0 +1,77 @@
package androidTestCases;
import BaseTest.AndroidBaseTest;
import inji.api.BaseTestCase;
import inji.constants.Target;
import inji.pages.*;
import inji.utils.TestDataReader;
import org.testng.annotations.Test;
import org.testng.asserts.SoftAssert;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertTrue;
public class VcDownloadAndVerifyUsingMockIdentity extends AndroidBaseTest {
@Test
public void downloadAndVerifyVcUsingUinViaMockIdentity() throws InterruptedException {
ChooseLanguagePage chooseLanguagePage = new ChooseLanguagePage(driver);
assertTrue(chooseLanguagePage.isChooseLanguagePageLoaded(), "Verify if choose language page is displayed");
WelcomePage welcomePage = chooseLanguagePage.clickOnSavePreference();
assertTrue(welcomePage.isWelcomePageLoaded(), "Verify if welcome page is loaded");
AppUnlockMethodPage appUnlockMethodPage = welcomePage.clickOnSkipButton();
assertTrue(appUnlockMethodPage.isAppUnlockMethodPageLoaded(), "Verify if app unlocked page is displayed");
SetPasscode setPasscode = appUnlockMethodPage.clickOnUsePasscode();
assertTrue(setPasscode.isSetPassCodePageLoaded(), "Verify if set passcode page is displayed");
ConfirmPasscode confirmPasscode = setPasscode.enterPasscode(TestDataReader.readData("passcode"), Target.ANDROID);
assertTrue(confirmPasscode.isConfirmPassCodePageLoaded(), "Verify if confirm passcode page is displayed");
HomePage homePage = confirmPasscode.enterPasscodeInConfirmPasscodePage(TestDataReader.readData("passcode"), Target.ANDROID);
homePage.clickOnNextButtonForInjiTour();
assertTrue(homePage.isHomePageLoaded(), "Verify if home page is displayed");
AddNewCardPage addNewCardPage = homePage.downloadCard();
assertTrue(addNewCardPage.isAddNewCardPageLoaded(), "Verify if add new card page is displayed");
assertTrue(addNewCardPage.isIssuerDescriptionEsignetDisplayed(), "Verify if issuer description esignet displayed");
assertTrue(addNewCardPage.isIssuerSearchBarDisplayed(), "Verify if issuer search bar displayed");
// addNewCardPage.sendTextInIssuerSearchBar("Download MOSIP Credentials");
assertTrue(addNewCardPage.isAddNewCardPageLoaded(), "Verify if add new card page is displayed");
assertTrue(addNewCardPage.isAddNewCardPageGuideMessageForEsignetDisplayed(), "Verify if add new card guide message displayed");
assertTrue(addNewCardPage.isDownloadViaEsignetDisplayed(), "Verify if download via uin displayed");
MockCertifyLoginPage mockCertifyLoginPage = addNewCardPage.clickOnDownloadViaMockCertify();
// mockCertifyLoginPage.clickOnEsignetLoginWithOtpButton();
assertTrue(mockCertifyLoginPage.isEnterYourVidTextDisplayed(), "Verify if enter your vid text is displayed");
OtpVerificationPage otpVerification= mockCertifyLoginPage.setEnterIdTextBox(TestDataReader.readData("MockVc"));
mockCertifyLoginPage.clickOnGetOtpButton();
assertTrue(mockCertifyLoginPage.isOtpHasSendMessageDisplayed(),"verify if otp page is displayed");
otpVerification.enterOtpForEsignet(BaseTestCase.getOtp(), Target.ANDROID);
mockCertifyLoginPage.clickOnVerifyButtonIos();
assertTrue(homePage.isNameDisplayed(TestDataReader.readData("fullNameForMobileDrivingLicense")), "Verify if full name is displayed");
DetailedVcViewPage detailedVcViewPage = homePage.openDetailedVcView(TestDataReader.readData("fullNameForMobileDrivingLicense"));
detailedVcViewPage.clickOnQrCodeButton();
SoftAssert softAssert = new SoftAssert();
softAssert.assertTrue(detailedVcViewPage.isQrCodeDisplayed(), "Verify if QR Code header is displayed");
detailedVcViewPage.clickOnQrCrossIcon();
assertTrue(detailedVcViewPage.isEsignetLogoDisplayed(), "Verify if detailed Vc esignet logo is displayed");
assertTrue(detailedVcViewPage.isDetailedVcViewPageLoaded(), "Verify if detailed Vc view page is displayed");
// assertEquals(detailedVcViewPage.getNameInDetailedVcView(), TestDataReader.readData("fullNameForMobileDrivingLicense"), "Verify if full name is displayed");
// assertEquals(detailedVcViewPage.getDateOfBirthInDetailedVcView(), TestDataReader.readData("dateOfBirthForMobileDrivingLicense"), "Verify if date of birth is displayed");
assertEquals(detailedVcViewPage.getIdTypeValueInDetailedVcView(), TestDataReader.readData("idTypeForMobileDrivingLicense"), "Verify if id type is displayed");
assertEquals(detailedVcViewPage.getStatusInDetailedVcView(), TestDataReader.readData("status"), "Verify if status is displayed");
assertTrue(detailedVcViewPage.isKeyTypeVcDetailViewValueDisplayed(), "Verify if key type detailed Vc value displayed");
detailedVcViewPage.clickOnBackArrow();
assertTrue(detailedVcViewPage.isEsignetLogoDisplayed(), "Verify if detailed Vc esignet logo is displayed");
}
}

View File

@@ -0,0 +1,212 @@
package androidTestCases;
import BaseTest.AndroidBaseTest;
import com.google.common.collect.ImmutableMap;
import inji.api.BaseTestCase;
import inji.constants.Target;
import inji.pages.*;
import inji.utils.IosUtil;
import inji.utils.TestDataReader;
import io.appium.java_client.PerformsTouchActions;
import io.appium.java_client.android.AndroidTouchAction;
import io.appium.java_client.touch.LongPressOptions;
import io.appium.java_client.touch.offset.ElementOption;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.remote.RemoteWebElement;
import org.testng.annotations.Test;
import org.testng.asserts.SoftAssert;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertTrue;
public class keyManagement extends AndroidBaseTest {
@Test
public void downloadAndVerifyVcUsingUinViaSunbird() throws InterruptedException {
ChooseLanguagePage chooseLanguagePage = new ChooseLanguagePage(driver);
assertTrue(chooseLanguagePage.isChooseLanguagePageLoaded(), "Verify if choose language page is displayed");
WelcomePage welcomePage = chooseLanguagePage.clickOnSavePreference();
assertTrue(welcomePage.isWelcomePageLoaded(), "Verify if welcome page is loaded");
AppUnlockMethodPage appUnlockMethodPage = welcomePage.clickOnSkipButton();
assertTrue(appUnlockMethodPage.isAppUnlockMethodPageLoaded(), "Verify if app unlocked page is displayed");
SetPasscode setPasscode = appUnlockMethodPage.clickOnUsePasscode();
assertTrue(setPasscode.isSetPassCodePageLoaded(), "Verify if set passcode page is displayed");
ConfirmPasscode confirmPasscode = setPasscode.enterPasscode(TestDataReader.readData("passcode"), Target.ANDROID);
assertTrue(confirmPasscode.isConfirmPassCodePageLoaded(), "Verify if confirm passcode page is displayed");
HomePage homePage = confirmPasscode.enterPasscodeInConfirmPasscodePage(TestDataReader.readData("passcode"), Target.ANDROID);
homePage.clickOnNextButtonForInjiTour();
assertTrue(homePage.isHomePageLoaded(), "Verify if home page is displayed");
SettingsPage settingsPage = homePage.clickOnSettingIcon();
settingsPage.clickOnKeyManagement();
Thread.sleep(3000);
KeyManagementPage keyManagementPage = new KeyManagementPage(driver);
keyManagementPage.clickOnDoneButton();
Thread.sleep(3000);
IosUtil.dragAndDrop(driver,keyManagementPage.getTheCoordinatesForRSA(),keyManagementPage.getTheCoordinatesED25519Text());
keyManagementPage.clickOnSaveKeyOrderingPreferenceButton();
assertTrue(keyManagementPage.iskeyOrderingSuccessTextMessageDisplayed(), "Verify if confirm passcode page is displayed");
keyManagementPage.clickOnArrowleftButton();
homePage.clickOnHomeButton();
AddNewCardPage addNewCardPage = homePage.downloadCard();
SunbirdLoginPage sunbirdLoginPage = addNewCardPage.clickOnDownloadViaSunbird();
addNewCardPage.clickOnCredentialTypeHeadingInsuranceCredential();
sunbirdLoginPage.enterPolicyNumberTextBox(TestDataReader.readData("policyNumberSunbird"));
sunbirdLoginPage.enterFullNameTextBox(TestDataReader.readData("fullNameSunbird"));
sunbirdLoginPage.enterDateOfBirthTextBox();
sunbirdLoginPage.clickOnloginButton();
assertTrue(sunbirdLoginPage.isSunbirdCardIsActive(), "Verify if download sunbird displayed active");
assertTrue(sunbirdLoginPage.isSunbirdCardLogoIsDisplayed(), "Verify if download sunbird logo displayed");
assertEquals(sunbirdLoginPage.getFullNameForSunbirdCard(),TestDataReader.readData("fullNameSunbird"));
sunbirdLoginPage.openDetailedSunbirdVcView();
assertEquals(sunbirdLoginPage.getFullNameForSunbirdCard(),TestDataReader.readData("fullNameSunbird"));
assertTrue(keyManagementPage.compareListOfKeys());
}
@Test
public void downloadAndVerifyVcUsingMockIdentity() throws InterruptedException {
ChooseLanguagePage chooseLanguagePage = new ChooseLanguagePage(driver);
assertTrue(chooseLanguagePage.isChooseLanguagePageLoaded(), "Verify if choose language page is displayed");
WelcomePage welcomePage = chooseLanguagePage.clickOnSavePreference();
assertTrue(welcomePage.isWelcomePageLoaded(), "Verify if welcome page is loaded");
AppUnlockMethodPage appUnlockMethodPage = welcomePage.clickOnSkipButton();
assertTrue(appUnlockMethodPage.isAppUnlockMethodPageLoaded(), "Verify if app unlocked page is displayed");
SetPasscode setPasscode = appUnlockMethodPage.clickOnUsePasscode();
assertTrue(setPasscode.isSetPassCodePageLoaded(), "Verify if set passcode page is displayed");
ConfirmPasscode confirmPasscode = setPasscode.enterPasscode(TestDataReader.readData("passcode"), Target.ANDROID);
assertTrue(confirmPasscode.isConfirmPassCodePageLoaded(), "Verify if confirm passcode page is displayed");
HomePage homePage = confirmPasscode.enterPasscodeInConfirmPasscodePage(TestDataReader.readData("passcode"), Target.ANDROID);
homePage.clickOnNextButtonForInjiTour();
assertTrue(homePage.isHomePageLoaded(), "Verify if home page is displayed");
SettingsPage settingsPage = homePage.clickOnSettingIcon();
settingsPage.clickOnKeyManagement();
Thread.sleep(3000);
KeyManagementPage keyManagementPage = new KeyManagementPage(driver);
keyManagementPage.clickOnDoneButton();
Thread.sleep(3000);
IosUtil.dragAndDrop(driver,keyManagementPage.getTheCoordinatesECCR1TextText(),keyManagementPage.getTheCoordinatesED25519Text());
keyManagementPage.clickOnSaveKeyOrderingPreferenceButton();
assertTrue(keyManagementPage.iskeyOrderingSuccessTextMessageDisplayed(), "Verify if confirm passcode page is displayed");
keyManagementPage.clickOnArrowleftButton();
homePage.clickOnHomeButton();
AddNewCardPage addNewCardPage = homePage.downloadCard();
MockCertifyLoginPage mockCertifyLoginPage = addNewCardPage.clickOnDownloadViaMockCertify();
// mockCertifyLoginPage.clickOnEsignetLoginWithOtpButton();
assertTrue(mockCertifyLoginPage.isEnterYourVidTextDisplayed(), "Verify if enter your vid text is displayed");
OtpVerificationPage otpVerification= mockCertifyLoginPage.setEnterIdTextBox(TestDataReader.readData("MockVc"));
mockCertifyLoginPage.clickOnGetOtpButton();
assertTrue(mockCertifyLoginPage.isOtpHasSendMessageDisplayed(),"verify if otp page is displayed");
otpVerification.enterOtpForEsignet(BaseTestCase.getOtp(), Target.ANDROID);
mockCertifyLoginPage.clickOnVerifyButton();
assertTrue(homePage.isNameDisplayed(TestDataReader.readData("fullNameForMobileDrivingLicense")), "Verify if full name is displayed");
DetailedVcViewPage detailedVcViewPage = homePage.openDetailedVcView(TestDataReader.readData("fullNameForMobileDrivingLicense"));
detailedVcViewPage.clickOnQrCodeButton();
SoftAssert softAssert = new SoftAssert();
softAssert.assertTrue(detailedVcViewPage.isQrCodeDisplayed(), "Verify if QR Code header is displayed");
detailedVcViewPage.clickOnQrCrossIcon();
assertTrue(detailedVcViewPage.isEsignetLogoDisplayed(), "Verify if detailed Vc esignet logo is displayed");
assertTrue(detailedVcViewPage.isDetailedVcViewPageLoaded(), "Verify if detailed Vc view page is displayed");
assertEquals(detailedVcViewPage.getIdTypeValueInDetailedVcView(), TestDataReader.readData("idTypeForMobileDrivingLicense"), "Verify if id type is displayed");
assertEquals(detailedVcViewPage.getStatusInDetailedVcView(), TestDataReader.readData("status"), "Verify if status is displayed");
assertTrue(detailedVcViewPage.isKeyTypeVcDetailViewValueDisplayed(), "Verify if key type detailed Vc value displayed");
assertTrue(keyManagementPage.compareListOfKeys());
}
@Test
public void downloadAndVerifyVcUsingEsignet() throws InterruptedException {
ChooseLanguagePage chooseLanguagePage = new ChooseLanguagePage(driver);
assertTrue(chooseLanguagePage.isChooseLanguagePageLoaded(), "Verify if choose language page is displayed");
WelcomePage welcomePage = chooseLanguagePage.clickOnSavePreference();
assertTrue(welcomePage.isWelcomePageLoaded(), "Verify if welcome page is loaded");
AppUnlockMethodPage appUnlockMethodPage = welcomePage.clickOnSkipButton();
assertTrue(appUnlockMethodPage.isAppUnlockMethodPageLoaded(), "Verify if app unlocked page is displayed");
SetPasscode setPasscode = appUnlockMethodPage.clickOnUsePasscode();
assertTrue(setPasscode.isSetPassCodePageLoaded(), "Verify if set passcode page is displayed");
ConfirmPasscode confirmPasscode = setPasscode.enterPasscode(TestDataReader.readData("passcode"), Target.ANDROID);
assertTrue(confirmPasscode.isConfirmPassCodePageLoaded(), "Verify if confirm passcode page is displayed");
HomePage homePage = confirmPasscode.enterPasscodeInConfirmPasscodePage(TestDataReader.readData("passcode"), Target.ANDROID);
homePage.clickOnNextButtonForInjiTour();
assertTrue(homePage.isHomePageLoaded(), "Verify if home page is displayed");
SettingsPage settingsPage = homePage.clickOnSettingIcon();
settingsPage.clickOnKeyManagement();
Thread.sleep(3000);
KeyManagementPage keyManagementPage = new KeyManagementPage(driver);
keyManagementPage.clickOnDoneButton();
Thread.sleep(3000);
IosUtil.dragAndDrop(driver,keyManagementPage.getTheCoordinatesForRSA(),keyManagementPage.getTheCoordinatesED25519Text());
keyManagementPage.clickOnSaveKeyOrderingPreferenceButton();
assertTrue(keyManagementPage.iskeyOrderingSuccessTextMessageDisplayed(), "Verify if confirm passcode page is displayed");
keyManagementPage.clickOnArrowleftButton();
homePage.clickOnHomeButton();
AddNewCardPage addNewCardPage = homePage.downloadCard();
EsignetLoginPage esignetLoginPage = addNewCardPage.clickOnDownloadViaEsignet();
esignetLoginPage.clickOnEsignetLoginWithOtpButton();
assertTrue(esignetLoginPage.isEnterYourVidTextDisplayed(), "Verify if enter your vid text is displayed");
String uin=TestDataReader.readData("uin");
OtpVerificationPage otpVerification= esignetLoginPage.setEnterIdTextBox(uin);
esignetLoginPage.clickOnGetOtpButton();
assertTrue(esignetLoginPage.isOtpHasSendMessageDisplayed(),"verify if otp page is displayed");
otpVerification.enterOtpForEsignet(BaseTestCase.getOtp(), Target.ANDROID);
esignetLoginPage.clickOnVerifyButton();
assertTrue(homePage.isNameDisplayed(TestDataReader.readData("fullName")), "Verify if full name is displayed");
DetailedVcViewPage detailedVcViewPage = homePage.openDetailedVcView(TestDataReader.readData("fullName"));
detailedVcViewPage.clickOnQrCodeButton();
SoftAssert softAssert = new SoftAssert();
softAssert.assertTrue(detailedVcViewPage.isQrCodeDisplayed(), "Verify if QR Code header is displayed");
// detailedVcViewPage.clickOnQrCrossIcon();
// assertTrue(detailedVcViewPage.isEsignetLogoDisplayed(), "Verify if detailed Vc esignet logo is displayed");
assertTrue(detailedVcViewPage.isDetailedVcViewPageLoaded(), "Verify if detailed Vc view page is displayed");
assertTrue(keyManagementPage.compareListOfKeys());
}
}

View File

@@ -0,0 +1,48 @@
package iosTestCases;
import BaseTest.IosBaseTest;
import inji.api.BaseTestCase;
import inji.constants.Target;
import inji.pages.*;
import inji.utils.IosUtil;
import inji.utils.TestDataReader;
import org.testng.annotations.Test;
import org.testng.asserts.SoftAssert;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertTrue;
public class KeyManagmentTest extends IosBaseTest {
@Test
public void downloadAndVerifyVcUsingUinViaEsignet() throws InterruptedException {
ChooseLanguagePage chooseLanguagePage = new ChooseLanguagePage(driver);
assertTrue(chooseLanguagePage.isChooseLanguagePageLoaded(), "Verify if choose language page is displayed");
WelcomePage welcomePage = chooseLanguagePage.clickOnSavePreference();
assertTrue(welcomePage.isWelcomePageLoaded(), "Verify if welcome page is loaded");
AppUnlockMethodPage appUnlockMethodPage = welcomePage.clickOnSkipButton();
assertTrue(appUnlockMethodPage.isAppUnlockMethodPageLoaded(), "Verify if app unlocked page is displayed");
SetPasscode setPasscode = appUnlockMethodPage.clickOnUsePasscode();
assertTrue(setPasscode.isSetPassCodePageLoaded(), "Verify if set passcode page is displayed");
ConfirmPasscode confirmPasscode = setPasscode.enterPasscode(TestDataReader.readData("passcode"), Target.IOS);
assertTrue(confirmPasscode.isConfirmPassCodePageLoaded(), "Verify if confirm passcode page is displayed");
HomePage homePage = confirmPasscode.enterPasscodeInConfirmPasscodePage(TestDataReader.readData("passcode"), Target.IOS);
homePage.clickOnNextButtonForInjiTour();
assertTrue(homePage.isHomePageLoaded(), "Verify if home page is displayed");
SettingsPage settingsPage = homePage.clickOnSettingIcon();
settingsPage.clickOnKeyManagement();
Thread.sleep(3000);
KeyManagementPage keyManagementPage = new KeyManagementPage(driver);
keyManagementPage.clickOnDoneButton();
Thread.sleep(3000);
IosUtil.dragAndDropForIos(driver,keyManagementPage.getTheCoordinatesForRSA(),keyManagementPage.getTheCoordinatesED25519Text());
keyManagementPage.clickOnSaveKeyOrderingPreferenceButton();
}
}

View File

@@ -0,0 +1,76 @@
package iosTestCases;
import BaseTest.IosBaseTest;
import inji.api.BaseTestCase;
import inji.constants.Target;
import inji.pages.*;
import inji.utils.TestDataReader;
import org.testng.annotations.Test;
import org.testng.asserts.SoftAssert;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertTrue;
public class VcDownloadAndVerifyUsingMockIdentityTest extends IosBaseTest {
@Test
public void downloadAndVerifyVcUsingUinViaEsignet() throws InterruptedException {
ChooseLanguagePage chooseLanguagePage = new ChooseLanguagePage(driver);
assertTrue(chooseLanguagePage.isChooseLanguagePageLoaded(), "Verify if choose language page is displayed");
WelcomePage welcomePage = chooseLanguagePage.clickOnSavePreference();
assertTrue(welcomePage.isWelcomePageLoaded(), "Verify if welcome page is loaded");
AppUnlockMethodPage appUnlockMethodPage = welcomePage.clickOnSkipButton();
assertTrue(appUnlockMethodPage.isAppUnlockMethodPageLoaded(), "Verify if app unlocked page is displayed");
SetPasscode setPasscode = appUnlockMethodPage.clickOnUsePasscode();
assertTrue(setPasscode.isSetPassCodePageLoaded(), "Verify if set passcode page is displayed");
ConfirmPasscode confirmPasscode = setPasscode.enterPasscode(TestDataReader.readData("passcode"), Target.IOS);
assertTrue(confirmPasscode.isConfirmPassCodePageLoaded(), "Verify if confirm passcode page is displayed");
HomePage homePage = confirmPasscode.enterPasscodeInConfirmPasscodePage(TestDataReader.readData("passcode"), Target.IOS);
homePage.clickOnNextButtonForInjiTour();
assertTrue(homePage.isHomePageLoaded(), "Verify if home page is displayed");
AddNewCardPage addNewCardPage = homePage.downloadCard();
assertTrue(addNewCardPage.isAddNewCardPageLoaded(), "Verify if add new card page is displayed");
assertTrue(addNewCardPage.isIssuerDescriptionEsignetDisplayed(), "Verify if issuer description esignet displayed");
assertTrue(addNewCardPage.isIssuerSearchBarDisplayed(), "Verify if issuer search bar displayed");
// addNewCardPage.sendTextInIssuerSearchBar("Download MOSIP Credentials");
assertTrue(addNewCardPage.isAddNewCardPageLoaded(), "Verify if add new card page is displayed");
assertTrue(addNewCardPage.isAddNewCardPageGuideMessageForEsignetDisplayed(), "Verify if add new card guide message displayed");
assertTrue(addNewCardPage.isDownloadViaEsignetDisplayed(), "Verify if download via uin displayed");
MockCertifyLoginPage mockCertifyLoginPage = addNewCardPage.clickOnDownloadViaMockCertify();
addNewCardPage.clickOnContinueButtonInSigninPopupIos();
Thread.sleep(9000);
OtpVerificationPage otpVerification= mockCertifyLoginPage.setEnterIdTextBox(TestDataReader.readData("MockVc"));
mockCertifyLoginPage.clickOnGetOtpButton();
// assertTrue(mockCertifyLoginPage.isOtpHasSendMessageDisplayed(),"verify if otp page is displayed");
otpVerification.enterOtpForEsignet(BaseTestCase.getOtp(), Target.IOS);
mockCertifyLoginPage.clickOnVerifyButtonIos();
assertTrue(homePage.isNameDisplayed(TestDataReader.readData("fullNameForMobileDrivingLicense")), "Verify if full name is displayed");
DetailedVcViewPage detailedVcViewPage = homePage.openDetailedVcView(TestDataReader.readData("fullNameForMobileDrivingLicense"));
detailedVcViewPage.clickOnQrCodeButton();
SoftAssert softAssert = new SoftAssert();
softAssert.assertTrue(detailedVcViewPage.isQrCodeDisplayed(), "Verify if QR Code header is displayed");
detailedVcViewPage.clickOnQrCrossIcon();
assertTrue(detailedVcViewPage.isEsignetLogoDisplayed(), "Verify if detailed Vc esignet logo is displayed");
assertTrue(detailedVcViewPage.isDetailedVcViewPageLoaded(), "Verify if detailed Vc view page is displayed");
// assertEquals(detailedVcViewPage.getNameInDetailedVcView(), TestDataReader.readData("fullNameForMobileDrivingLicense"), "Verify if full name is displayed");
// assertEquals(detailedVcViewPage.getDateOfBirthInDetailedVcView(), TestDataReader.readData("dateOfBirthForMobileDrivingLicense"), "Verify if date of birth is displayed");
assertEquals(detailedVcViewPage.getIdTypeValueInDetailedVcView(), TestDataReader.readData("idTypeForMobileDrivingLicense"), "Verify if id type is displayed");
assertEquals(detailedVcViewPage.getStatusInDetailedVcView(), TestDataReader.readData("status"), "Verify if status is displayed");
assertTrue(detailedVcViewPage.isKeyTypeVcDetailViewValueDisplayed(), "Verify if key type detailed Vc value displayed");
detailedVcViewPage.clickOnBackArrow();
assertTrue(detailedVcViewPage.isEsignetLogoDisplayed(), "Verify if detailed Vc esignet logo is displayed");
}
}

View File

@@ -30,7 +30,7 @@
9C4850532C3E59E2002ECBD5 /* RNEventEmitterProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C4850522C3E59E2002ECBD5 /* RNEventEmitterProtocol.swift */; };
9C7CDF3E2C7CBEDE00243A9A /* RNSecureKeystoreModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C7CDF3D2C7CBEDE00243A9A /* RNSecureKeystoreModule.swift */; };
9C7CDF432C7CC13500243A9A /* RNSecureKeystoreModule.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C7CDF422C7CC13500243A9A /* RNSecureKeystoreModule.m */; };
9C7CDF492C89802C00243A9A /* securekeystore in Frameworks */ = {isa = PBXBuildFile; productRef = 9C7CDF482C89802C00243A9A /* securekeystore */; };
9CCCA19E2CF87A8400D5A461 /* securekeystore in Frameworks */ = {isa = PBXBuildFile; productRef = 9CCCA19D2CF87A8400D5A461 /* securekeystore */; };
B18059E884C0ABDD17F3DC3D /* ExpoModulesProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAC715A2D49A985799AEE119 /* ExpoModulesProvider.swift */; };
BB2F792D24A3F905000567C9 /* Expo.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB2F792C24A3F905000567C9 /* Expo.plist */; };
E86208152C0335C5007C3E24 /* RNVCIClientModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = E86208142C0335C5007C3E24 /* RNVCIClientModule.swift */; };
@@ -116,8 +116,8 @@
34873E472CD8DAF3004DE734 /* VCIClient in Frameworks */,
9C4850432C3E5873002ECBD5 /* ios-tuvali-library in Frameworks */,
1E6875E92CA554E80086D870 /* OpenID4VP in Frameworks */,
9CCCA19E2CF87A8400D5A461 /* securekeystore in Frameworks */,
34873E4D2CD8DD11004DE734 /* pixelpass in Frameworks */,
9C7CDF492C89802C00243A9A /* securekeystore in Frameworks */,
96905EF65AED1B983A6B3ABC /* libPods-Inji.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -282,10 +282,10 @@
name = Inji;
packageProductDependencies = (
9C4850422C3E5873002ECBD5 /* ios-tuvali-library */,
9C7CDF482C89802C00243A9A /* securekeystore */,
1E6875E82CA554E80086D870 /* OpenID4VP */,
34873E462CD8DAF3004DE734 /* VCIClient */,
34873E4C2CD8DD11004DE734 /* pixelpass */,
9CCCA19D2CF87A8400D5A461 /* securekeystore */,
);
productName = Inji;
productReference = 13B07F961A680F5B00A75B9A /* Inji.app */;
@@ -317,8 +317,8 @@
34873E4B2CD8DD11004DE734 /* XCRemoteSwiftPackageReference "pixelpass-ios-swift" */,
34873E452CD8DAF3004DE734 /* XCRemoteSwiftPackageReference "inji-vci-client-ios-swift" */,
9C4850412C3E5873002ECBD5 /* XCRemoteSwiftPackageReference "tuvali-ios-swift" */,
9C7CDF472C89802C00243A9A /* XCRemoteSwiftPackageReference "secure-keystore-ios-swift" */,
1E6875E72CA554E80086D870 /* XCRemoteSwiftPackageReference "inji-openid4vp-ios-swift" */,
9CCCA19C2CF87A8400D5A461 /* XCRemoteSwiftPackageReference "secure-keystore-ios-swift" */,
);
productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */;
projectDirPath = "";
@@ -771,22 +771,6 @@
kind = branch;
};
};
9C4850412C3E5873002ECBD5 /* XCRemoteSwiftPackageReference "tuvali-ios-swift" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/mosip/tuvali-ios-swift/";
requirement = {
branch = develop;
kind = branch;
};
};
9C7CDF472C89802C00243A9A /* XCRemoteSwiftPackageReference "secure-keystore-ios-swift" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/mosip/secure-keystore-ios-swift";
requirement = {
branch = develop;
kind = branch;
};
};
34873E452CD8DAF3004DE734 /* XCRemoteSwiftPackageReference "inji-vci-client-ios-swift" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/mosip/inji-vci-client-ios-swift";
@@ -803,6 +787,22 @@
kind = branch;
};
};
9C4850412C3E5873002ECBD5 /* XCRemoteSwiftPackageReference "tuvali-ios-swift" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/mosip/tuvali-ios-swift/";
requirement = {
branch = develop;
kind = branch;
};
};
9CCCA19C2CF87A8400D5A461 /* XCRemoteSwiftPackageReference "secure-keystore-ios-swift" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/mosip/secure-keystore-ios-swift";
requirement = {
branch = develop;
kind = branch;
};
};
/* End XCRemoteSwiftPackageReference section */
/* Begin XCSwiftPackageProductDependency section */
@@ -811,25 +811,25 @@
package = 1E6875E72CA554E80086D870 /* XCRemoteSwiftPackageReference "inji-openid4vp-ios-swift" */;
productName = OpenID4VP;
};
9C4850422C3E5873002ECBD5 /* ios-tuvali-library */ = {
34873E462CD8DAF3004DE734 /* VCIClient */ = {
isa = XCSwiftPackageProductDependency;
package = 9C4850412C3E5873002ECBD5 /* XCRemoteSwiftPackageReference "tuvali-ios-swift" */;
productName = "ios-tuvali-library";
};
9C7CDF482C89802C00243A9A /* securekeystore */ = {
isa = XCSwiftPackageProductDependency;
package = 9C7CDF472C89802C00243A9A /* XCRemoteSwiftPackageReference "secure-keystore-ios-swift" */;
productName = securekeystore;
package = 34873E452CD8DAF3004DE734 /* XCRemoteSwiftPackageReference "inji-vci-client-ios-swift" */;
productName = VCIClient;
};
34873E4C2CD8DD11004DE734 /* pixelpass */ = {
isa = XCSwiftPackageProductDependency;
package = 34873E4B2CD8DD11004DE734 /* XCRemoteSwiftPackageReference "pixelpass-ios-swift" */;
productName = pixelpass;
};
34873E462CD8DAF3004DE734 /* VCIClient */ = {
9C4850422C3E5873002ECBD5 /* ios-tuvali-library */ = {
isa = XCSwiftPackageProductDependency;
package = 34873E452CD8DAF3004DE734 /* XCRemoteSwiftPackageReference "inji-vci-client-ios-swift" */;
productName = VCIClient;
package = 9C4850412C3E5873002ECBD5 /* XCRemoteSwiftPackageReference "tuvali-ios-swift" */;
productName = "ios-tuvali-library";
};
9CCCA19D2CF87A8400D5A461 /* securekeystore */ = {
isa = XCSwiftPackageProductDependency;
package = 9CCCA19C2CF87A8400D5A461 /* XCRemoteSwiftPackageReference "secure-keystore-ios-swift" */;
productName = securekeystore;
};
/* End XCSwiftPackageProductDependency section */
};

View File

@@ -1,5 +1,5 @@
{
"originHash" : "178f6c7c607eeb08b99a4966015d08339500de64791888a2e79d6b7afae53659",
"originHash" : "6b82a714050e22d309e029aaffac33f021c04aac740f661a9879441a7d414f4f",
"pins" : [
{
"identity" : "base45-swift",
@@ -61,7 +61,7 @@
"location" : "https://github.com/mosip/secure-keystore-ios-swift",
"state" : {
"branch" : "develop",
"revision" : "8fdfcfe515dc58c0896716c34204c89669e11f89"
"revision" : "767b9dabd1a0cd374732ee97cb7cf34dd051acc1"
}
},
{

View File

@@ -83,5 +83,14 @@ RCT_EXTERN_METHOD(clearKeys:(RCTPromiseResolveBlock)resolve
RCT_EXTERN_METHOD(getJwk: (RCTPromiseResolveBlock)resolve
rejecter: (RCTPromiseRejectBlock)reject)
RCT_EXTERN_METHOD(storeValueInCloud:(NSString *)key
value:(NSString *)value
resolver:(RCTPromiseResolveBlock)resolve
rejecter:(RCTPromiseRejectBlock)reject)
RCT_EXTERN_METHOD(retrieveValueFromCloud:(NSString *)key
resolver:(RCTPromiseResolveBlock)resolve
rejecter:(RCTPromiseRejectBlock)reject)
@end

View File

@@ -252,8 +252,32 @@ class RNSecureKeystoreModule: NSObject,RCTBridgeModule {
}
secureKeystore.retrieveKey(tag: alias, onSuccess: successLambda, onFailure: failureLambda)
}
@objc
func storeValueInCloud(_ key: String, value: String, resolver resolve: @escaping RCTPromiseResolveBlock, rejecter reject: @escaping RCTPromiseRejectBlock) {
let successLambda: (Bool) -> Void = { success in
resolve(success)
}
let failureLambda: (String, String) -> Void = { code, message in
reject(code, message, nil)
}
secureKeystore.storeValueInCloud(key: key, value: value, onSuccess: successLambda, onFailure: failureLambda)
}
@objc
func retrieveValueFromCloud(_ key: String, resolver resolve: @escaping RCTPromiseResolveBlock, rejecter reject: @escaping RCTPromiseRejectBlock) {
let successLambda: (String?) -> Void = { value in
resolve(value)
}
let failureLambda: (String, String) -> Void = { code, message in
reject(code, message, nil)
}
secureKeystore.retrieveValueFromCloud(key: key, onSuccess: successLambda, onFailure: failureLambda)
}
}

View File

@@ -1,20 +1,20 @@
{
"ActivityLogText": {
"VC_SHARED": "تم مشاركة {{idType}} {{id}} بنجاح.",
"VC_RECEIVED": "تم استلام {{idType}} {{id}}.",
"VC_RECEIVED_NOT_SAVED": "لم يتمكن من حفظ {{idType}} {{id}}.",
"VC_DELETED": "تم حذف {{idType}} {{id}} بنجاح.",
"VC_DOWNLOADED": "تم تنزيل {{idType}} {{id}}.",
"VC_SHARED_WITH_VERIFICATION_CONSENT": "تم مشاركة {{idType}} {{id}} بالموافقة للتحقق من الحضور.",
"VC_RECEIVED_WITH_PRESENCE_VERIFIED": "تم استلام {{idType}} {{id}} ونجح التحقق من الحضور.",
"VC_RECEIVED_BUT_PRESENCE_VERIFICATION_FAILED": "تم استلام {{idType}} {{id}} ولكن فشل التحقق من الحضور.",
"PRESENCE_VERIFIED_AND_VC_SHARED": "تم التحقق من الوجه بنجاح وتمت مشاركة {{idType}} {{id}}.",
"PRESENCE_VERIFICATION_FAILED": "فشل التحقق من الوجه أثناء محاولة مشاركة {{idType}} {{id}}.",
"QRLOGIN_SUCCESFULL": "نجح تسجيل الدخول باستخدام QR باستخدام {{idType}} {{id}}.",
"WALLET_BINDING_SUCCESSFULL": "تم تفعيل {{idType}} {{id}} بنجاح.",
"WALLET_BINDING_FAILURE": "فشل تفعيل {{idType}} {{id}}.",
"VC_REMOVED": "تم إزالة {{idType}} {{id}} من المحفظة.",
"TAMPERED_VC_REMOVED": "تم إزالة {{idType}} {{id}} من المحفظة بسبب العبث.",
"VC_SHARED": "تم مشاركة {{idType}} بنجاح.",
"VC_RECEIVED": "تم استلام {{idType}}.",
"VC_RECEIVED_NOT_SAVED": "لم يتمكن من حفظ {{idType}}.",
"VC_DELETED": "تم حذف {{idType}} بنجاح.",
"VC_DOWNLOADED": "تم تنزيل {{idType}}.",
"VC_SHARED_WITH_VERIFICATION_CONSENT": "تم مشاركة {{idType}} بالموافقة للتحقق من الحضور.",
"VC_RECEIVED_WITH_PRESENCE_VERIFIED": "تم استلام {{idType}} ونجح التحقق من الحضور.",
"VC_RECEIVED_BUT_PRESENCE_VERIFICATION_FAILED": "تم استلام {{idType}} ولكن فشل التحقق من الحضور.",
"PRESENCE_VERIFIED_AND_VC_SHARED": "تم التحقق من الوجه بنجاح وتمت مشاركة {{idType}}.",
"PRESENCE_VERIFICATION_FAILED": "فشل التحقق من الوجه أثناء محاولة مشاركة {{idType}}.",
"QRLOGIN_SUCCESFULL": "نجح تسجيل الدخول باستخدام QR باستخدام {{idType}}.",
"WALLET_BINDING_SUCCESSFULL": "تم تفعيل {{idType}} بنجاح.",
"WALLET_BINDING_FAILURE": "فشل تفعيل {{idType}}.",
"VC_REMOVED": "تم إزالة {{idType}} من المحفظة.",
"TAMPERED_VC_REMOVED": "تم إزالة {{idType}} من المحفظة بسبب العبث.",
"vpSharing": {
"SHARED_SUCCESSFULLY": "تمت مشاركة العرض التقديمي لبيانات الاعتماد بنجاح.",
"SHARED_WITH_FACE_VERIFIACTION": "تم التحقق من الوجه بنجاح، وتمت مشاركة العرض التقديمي لبيانات الاعتماد بنجاح.",
@@ -69,6 +69,7 @@
"generatedOn": "تم إنشاؤه في",
"status": "الحالة",
"valid": "صالح",
"expired": "منتهي الصلاحية",
"pending": "قيد الانتظار",
"photo": " صورة",
"fullName": "الاسم الكامل",
@@ -82,6 +83,7 @@
"id": "بطاقة تعريف",
"qrCodeHeader": "رمز الاستجابة السريعة",
"nationalCard": "الهوية الوطنية",
"identityCard": "بطاقة الهوية",
"insuranceCard": "بطاقة التأمين",
"beneficiaryCard": "بطاقة المستفيد",
"socialRegistryCard": "بطاقة السجل الاجتماعي",
@@ -157,7 +159,8 @@
"downloaded": "يملك",
"shared": "مشترك",
"received": "تلقى",
"deleted": "إزالة"
"deleted": "إزالة",
"historyHeaderLabel": "تاريخ"
},
"SettingScreen": {
"header": "إعدادات",
@@ -181,14 +184,15 @@
"keyPreferenceError": "عذرًا! حدث خطأ أثناء تعيين تفضيلات المفتاح الخاصة بك"
},
"AboutInji": {
"aboutInji": "حول إنجي",
"header": "حول إنجي",
"aboutInji": "حول محفظة إنجي",
"header": "حول محفظة إنجي",
"appID": " : ID طبيق",
"aboutDetails": "إنجي هو تطبيق جوال يمكن استخدامه كمحفظة رقمية لتخزين بيانات الاعتماد. كما يسمح بالتحقق من الهوية في الوضعين غير المتصلين بالإنترنت وفي أي مكان وزمان.",
"aboutDetails": "تجعل Inji Wallet البيانات جديرة بالثقة ومحمولة، وتتميز بواجهتين رئيسيتين تلبيان احتياجات المستخدمين المتنوعة، مع كون Inji Mobile إحداهما. باعتباره تطبيق محفظة قائمًا على الهاتف المحمول، يعد Inji Mobile حلاً آمنًا ولا مركزيًا يسمح للمستخدمين بتنزيل بيانات الاعتماد التي يمكن التحقق منها وإدارتها ومشاركتها والتحقق منها مباشرة من هواتفهم الذكية، مما يوفر طريقة سلسة وجديرة بالثقة للتعامل مع بيانات الاعتماد أثناء التنقل.",
"forMoreDetails": "لمزيد من التفاصيل",
"clickHere": "انقر هنا",
"version": "الإصدار",
"tuvaliVersion": "نسخة توفالي"
"tuvaliVersion": "نسخة توفالي",
"poweredBy": "مدعوم من Inji، منتج MOSIP"
},
"IssuersScreen": {
"title": "أضف بطاقة جديدة",
@@ -221,6 +225,10 @@
"title": "حدث خطأ!",
"message": "شكرًا على صبرك! نحن نواجه صعوبات تقنية في الوقت الحالي. يُرجى المحاولة مرة أخرى لاحقًا أو الاتصال بالمسؤول للحصول على مزيد من المساعدة!"
},
"authorizationGrantTypeNotSupportedByWallet": {
"title": "نوع المنحة غير مدعوم خطأ في التفويض!",
"message": "شكرًا على صبرك! نحن نواجه صعوبات تقنية في الوقت الحالي. يُرجى المحاولة مرة أخرى لاحقًا أو الاتصال بالمسؤول للحصول على مزيد من المساعدة!"
},
"verificationFailed": {
"title": "حدث خطأ!",
"goBackButton": "عُد",

View File

@@ -1,20 +1,20 @@
{
"ActivityLogText": {
"VC_SHARED": "{{idType}} {{id}} is shared successfully.",
"VC_RECEIVED": "Received {{idType}} {{id}}.",
"VC_RECEIVED_NOT_SAVED": "Couldn't save {{idType}} {{id}}.",
"VC_DELETED": "{{idType}} {{id}} is deleted successfully.",
"VC_DOWNLOADED": "{{idType}} {{id}} is downloaded.",
"VC_SHARED_WITH_VERIFICATION_CONSENT": "Shared {{idType}} {{id}} with consent for presence verification.",
"VC_RECEIVED_WITH_PRESENCE_VERIFIED": "Received {{idType}} {{id}} and presence verification is successful.",
"VC_RECEIVED_BUT_PRESENCE_VERIFICATION_FAILED": "Received {{idType}} {{id}} and presence verification failed.",
"PRESENCE_VERIFIED_AND_VC_SHARED": "Face verification is successful and {{idType}} {{id}} is shared.",
"PRESENCE_VERIFICATION_FAILED": "Face verification has failed while trying to share {{idType}} {{id}}.",
"QRLOGIN_SUCCESFULL": "QRLogin using {{idType}} {{id}} is successful.",
"WALLET_BINDING_SUCCESSFULL": "Activation of {{idType}} {{id}} is successful.",
"WALLET_BINDING_FAILURE": "Activation of {{idType}} {{id}} has failed.",
"VC_REMOVED": "{{idType}} {{id}} is removed from wallet.",
"TAMPERED_VC_REMOVED": "{{idType}} {{id}} is removed from from wallet due to tampering.",
"VC_SHARED": "{{idType}} is shared successfully.",
"VC_RECEIVED": "Received {{idType}}.",
"VC_RECEIVED_NOT_SAVED": "Couldn't save {{idType}}.",
"VC_DELETED": "{{idType}} is deleted successfully.",
"VC_DOWNLOADED": "{{idType}} is downloaded.",
"VC_SHARED_WITH_VERIFICATION_CONSENT": "Shared {{idType}} with consent for presence verification.",
"VC_RECEIVED_WITH_PRESENCE_VERIFIED": "Received {{idType}} and presence verification is successful.",
"VC_RECEIVED_BUT_PRESENCE_VERIFICATION_FAILED": "Received {{idType}} and presence verification failed.",
"PRESENCE_VERIFIED_AND_VC_SHARED": "Face verification is successful and {{idType}} is shared.",
"PRESENCE_VERIFICATION_FAILED": "Face verification has failed while trying to share {{idType}}.",
"QRLOGIN_SUCCESFULL": "QRLogin using {{idType}} is successful.",
"WALLET_BINDING_SUCCESSFULL": "Activation of {{idType}} is successful.",
"WALLET_BINDING_FAILURE": "Activation of {{idType}} has failed.",
"VC_REMOVED": "{{idType}} is removed from wallet.",
"TAMPERED_VC_REMOVED": "{{idType}} is removed from from wallet due to tampering.",
"vpSharing": {
"SHARED_SUCCESSFULLY": "Credential Presentation is shared successfully.",
"SHARED_WITH_FACE_VERIFIACTION": "Face verification is successful, and the Credential Presentation is shared successfully.",
@@ -70,6 +70,7 @@
"status": "Status",
"valid": "Valid",
"pending": "Pending",
"expired": "Expired",
"photo": "Photo",
"fullName": "Full Name",
"gender": "Gender",
@@ -82,6 +83,7 @@
"id": "ID",
"qrCodeHeader": "QR Code",
"nationalCard": "National ID",
"identityCard": "Identity Card",
"insuranceCard": "Insurance Card",
"beneficiaryCard": "Beneficiary Card",
"socialRegistryCard": "Social Registry Card",
@@ -157,7 +159,8 @@
"downloaded": "downloaded",
"shared": "shared",
"received": "received",
"deleted": "deleted"
"deleted": "deleted",
"historyHeaderLabel": "History"
},
"SettingScreen": {
"header": "Settings",
@@ -182,14 +185,15 @@
"keyPreferenceError": "Sorry! Error setting your key preferences"
},
"AboutInji": {
"aboutInji": "About Inji",
"header": "ABOUT INJI",
"aboutInji": "About Inji Wallet",
"header": "ABOUT INJI WALLET",
"appID": "App ID",
"aboutDetails": "Inji is a mobile app that can be used as a digital wallet to store credentials. It also allows identity verification in both offline and online modes, at any place and time.",
"aboutDetails": "Inji Wallet makes data trustworthy and portable, featuring two main interfaces that cater to diverse user needs, with Inji Mobile being one of them. As a mobile-based wallet app, Inji Mobile is a secure, decentralized solution that allows users to download, manage, share, and verify verifiable credentials directly from their smartphones, providing a seamless and trustworthy way to handle credentials on the go.",
"forMoreDetails": "For more details",
"clickHere": "Click here",
"version": "Version",
"tuvaliVersion": "Tuvali-version"
"tuvaliVersion": "Tuvali-version",
"poweredBy": "Powered by Inji, A MOSIP Product"
},
"IssuersScreen": {
"title": "Add new card",
@@ -222,6 +226,10 @@
"title": "An error occurred!",
"message": "Thanks for your patience! We're experiencing technical difficulties right now. Please try again later or contact the admin for further assistance!"
},
"authorizationGrantTypeNotSupportedByWallet": {
"title": "Grant type not supported authorization error!",
"message": "Thanks for your patience! We're experiencing technical difficulties right now. Please try again later or contact the admin for further assistance!"
},
"verificationFailed": {
"title": "An Error Occurred!",
"goBackButton": "Go Back",

View File

@@ -1,20 +1,20 @@
{
"ActivityLogText": {
"VC_SHARED": "Matagumpay na naibahagi ang {{idType}} {{id}}.",
"VC_RECEIVED": "Natanggap ang {{idType}} {{id}}.",
"VC_RECEIVED_NOT_SAVED": "Hindi ma-save ang {{idType}} {{id}}.",
"VC_DELETED": "Matagumpay na natanggal ang {{idType}} {{id}}.",
"VC_DOWNLOADED": "Na-download ang {{idType}} {{id}}.",
"VC_SHARED_WITH_VERIFICATION_CONSENT": "Ibinahagi ang {{idType}} {{id}} na may pahintulot para sa pag-verify ng presensya.",
"VC_RECEIVED_WITH_PRESENCE_VERIFIED": "Natanggap ang {{idType}} {{id}} at matagumpay ang pag-verify ng presensya.",
"VC_RECEIVED_BUT_PRESENCE_VERIFICATION_FAILED": "Natanggap ang {{idType}} {{id}} at nabigo ang pag-verify ng presensya.",
"PRESENCE_VERIFIED_AND_VC_SHARED": "Matagumpay ang pag-verify ng mukha at ibinahagi ang {{idType}} {{id}}.",
"PRESENCE_VERIFICATION_FAILED": "Nabigo ang pag-verify ng mukha habang sinusubukang ibahagi ang {{idType}} {{id}}.",
"QRLOGIN_SUCCESFULL": "Ang QRlogin gamit ang {{idType}} {{id}} ay matagumpay.",
"WALLET_BINDING_SUCCESSFULL": "Ang pag-activate ng {{idType}} {{id}} ay matagumpay.",
"WALLET_BINDING_FAILURE": "Nabigo ang pag-activate ng {{idType}} {{id}}.",
"VC_REMOVED": "Ang {{idType}} {{id}} ay inalis sa wallet.",
"TAMPERED_VC_REMOVED": "Ang {{idType}} {{id}} ay inalis mula sa wallet dahil sa pakikialam.",
"VC_SHARED": "Matagumpay na naibahagi ang {{idType}}.",
"VC_RECEIVED": "Natanggap ang {{idType}}.",
"VC_RECEIVED_NOT_SAVED": "Hindi ma-save ang {{idType}}.",
"VC_DELETED": "Matagumpay na natanggal ang {{idType}}.",
"VC_DOWNLOADED": "Na-download ang {{idType}}.",
"VC_SHARED_WITH_VERIFICATION_CONSENT": "Ibinahagi ang {{idType}} na may pahintulot para sa pag-verify ng presensya.",
"VC_RECEIVED_WITH_PRESENCE_VERIFIED": "Natanggap ang {{idType}} at matagumpay ang pag-verify ng presensya.",
"VC_RECEIVED_BUT_PRESENCE_VERIFICATION_FAILED": "Natanggap ang {{idType}} at nabigo ang pag-verify ng presensya.",
"PRESENCE_VERIFIED_AND_VC_SHARED": "Matagumpay ang pag-verify ng mukha at ibinahagi ang {{idType}}.",
"PRESENCE_VERIFICATION_FAILED": "Nabigo ang pag-verify ng mukha habang sinusubukang ibahagi ang {{idType}}.",
"QRLOGIN_SUCCESFULL": "Ang QRlogin gamit ang {{idType}} ay matagumpay.",
"WALLET_BINDING_SUCCESSFULL": "Ang pag-activate ng {{idType}} ay matagumpay.",
"WALLET_BINDING_FAILURE": "Nabigo ang pag-activate ng {{idType}}.",
"VC_REMOVED": "Ang {{idType}} ay inalis sa wallet.",
"TAMPERED_VC_REMOVED": "Ang {{idType}} ay inalis mula sa wallet dahil sa pakikialam.",
"vpSharing": {
"SHARED_SUCCESSFULLY": "Matagumpay na naibahagi ang Pagtatanghal ng Kredensyal.",
"SHARED_WITH_FACE_VERIFIACTION": "Matagumpay ang pag-verify sa mukha, at matagumpay na naibahagi ang Credential Presentation.",
@@ -70,6 +70,7 @@
"status": "Katayuan",
"valid": "Napatunayan",
"pending": "Nakabinbin",
"expired": "Nag-expire na",
"photo": "Larawan",
"fullName": "Buong pangalan",
"gender": "Kasarian",
@@ -82,6 +83,7 @@
"id": "Id",
"qrCodeHeader": "QR Code",
"nationalCard": "Pambansang ID",
"identityCard": "Kard ng Pagkakakilanlan",
"insuranceCard": "Insurance Card",
"beneficiaryCard": "Benepisyaryo Card",
"socialRegistryCard": "Social Registry Card",
@@ -157,7 +159,8 @@
"downloaded": "nakuha",
"shared": "ibinahagi",
"received": "natanggap",
"deleted": "tinanggal"
"deleted": "tinanggal",
"historyHeaderLabel": "Kasaysayan"
},
"SettingScreen": {
"header": "Mga setting",
@@ -181,14 +184,15 @@
"keyPreferenceError": "Paumanhin! May error sa pagsasaayos ng iyong mga kagustuhan sa key"
},
"AboutInji": {
"aboutInji": "Tungkol kay Inji",
"header": "TUNGKOL KAY INJI",
"aboutInji": "Tungkol kay Inji Wallet",
"header": "TUNGKOL SA INJI WALLET",
"appID": "App ID",
"aboutDetails": "Ang Inji ay isang mobile app na maaaring gamitin bilang digital wallet para mag-imbak ng mga kredensyal. Pinapayagan din nito ang pag-verify ng pagkakakilanlan sa parehong offline at online na mga mode, sa anumang lugar at oras.",
"aboutDetails": "Ginagawa ng Inji Wallet na mapagkakatiwalaan at portable ang data, na nagtatampok ng dalawang pangunahing interface na tumutugon sa magkakaibang pangangailangan ng user, kung saan ang Inji Mobile ang isa sa mga ito. Bilang isang mobile-based na wallet app, ang Inji Mobile ay isang secure, desentralisadong solusyon na nagbibigay-daan sa mga user na mag-download, mamahala, magbahagi, at mag-verify ng mga nabe-verify na kredensyal nang direkta mula sa kanilang mga smartphone, na nagbibigay ng maayos at mapagkakatiwalaang paraan upang mahawakan ang mga kredensyal on the go.",
"forMoreDetails": "Para sa karagdagang detalye",
"clickHere": "Pindutin dito",
"version": "Bersyon",
"tuvaliVersion": "Tuvali-bersyon"
"tuvaliVersion": "Tuvali-bersyon",
"poweredBy": "Pinapatakbo ng Inji, Isang Produktong MOSIP"
},
"IssuersScreen": {
"title": "Magdagdag ng bagong card",
@@ -221,6 +225,10 @@
"title": "May naganap na error!",
"message": "Salamat sa iyong pasensya! Nakakaranas kami ng mga teknikal na paghihirap ngayon. Pakisubukang muli mamaya o makipag-ugnayan sa admin para sa karagdagang tulong!"
},
"authorizationGrantTypeNotSupportedByWallet": {
"title": "Ang uri ng grant ay hindi sinusuportahan ng error sa pahintulot!",
"message": "Salamat sa iyong pasensya! Nakakaranas kami ng mga teknikal na paghihirap ngayon. Pakisubukang muli mamaya o makipag-ugnayan sa admin para sa karagdagang tulong!"
},
"verificationFailed": {
"title": "May pagkakamaling naganap!",
"goBackButton": "Bumalik ka",

View File

@@ -1,20 +1,20 @@
{
"ActivityLogText": {
"VC_SHARED": "{{idType}} {{id}} को सफलतापूर्वक साझा किया गया।",
"VC_RECEIVED": "{{idType}} {{id}} प्राप्त किया गया।",
"VC_RECEIVED_NOT_SAVED": "{{idType}} {{id}} को सहेजा नहीं जा सका।",
"VC_DELETED": "{{idType}} {{id}} को सफलतापूर्वक हटा दिया गया।",
"VC_DOWNLOADED": "{{idType}} {{id}} डाउनलोड हो गया है।",
"VC_SHARED_WITH_VERIFICATION_CONSENT": "उपस्थिति सत्यापन के लिए सहमति के साथ {{idType}} {{id}} साझा किया गया।",
"VC_RECEIVED_WITH_PRESENCE_VERIFIED": "{{idType}} {{id}} प्राप्त किया गया और उपस्थिति सत्यापन सफल रहा।",
"VC_RECEIVED_BUT_PRESENCE_VERIFICATION_FAILED": "{{idType}} {{id}} प्राप्त हुआ लेकिन उपस्थिति सत्यापन विफल रहा।",
"PRESENCE_VERIFIED_AND_VC_SHARED": "चेहरे का सत्यापन सफल है और {{idType}} {{id}} साझा किया गया है।",
"PRESENCE_VERIFICATION_FAILED": "{{idType}} {{id}} साझा करने का प्रयास करते समय चेहरे का सत्यापन विफल हो गया है।",
"QRLOGIN_SUCCESFULL": "{{idType}} {{id}} का उपयोग करके QRLogin सफल रहा।",
"WALLET_BINDING_SUCCESSFULL": "{{idType}} {{id}} का सक्रियण सफल रहा।",
"WALLET_BINDING_FAILURE": "{{idType}} {{id}} का सक्रियण विफल हो गया।",
"VC_REMOVED": "{{idType}} {{id}} को वॉलेट से हटा दिया गया।",
"TAMPERED_VC_REMOVED": "{{idType}} {{id}} को छेड़छाड़ के कारण वॉलेट से हटा दिया गया।",
"VC_SHARED": "{{idType}} को सफलतापूर्वक साझा किया गया।",
"VC_RECEIVED": "{{idType}} प्राप्त किया गया।",
"VC_RECEIVED_NOT_SAVED": "{{idType}} को सहेजा नहीं जा सका।",
"VC_DELETED": "{{idType}} को सफलतापूर्वक हटा दिया गया।",
"VC_DOWNLOADED": "{{idType}} डाउनलोड हो गया है।",
"VC_SHARED_WITH_VERIFICATION_CONSENT": "उपस्थिति सत्यापन के लिए सहमति के साथ {{idType}} साझा किया गया।",
"VC_RECEIVED_WITH_PRESENCE_VERIFIED": "{{idType}} प्राप्त किया गया और उपस्थिति सत्यापन सफल रहा।",
"VC_RECEIVED_BUT_PRESENCE_VERIFICATION_FAILED": "{{idType}} प्राप्त हुआ लेकिन उपस्थिति सत्यापन विफल रहा।",
"PRESENCE_VERIFIED_AND_VC_SHARED": "चेहरे का सत्यापन सफल है और {{idType}} साझा किया गया है।",
"PRESENCE_VERIFICATION_FAILED": "{{idType}} साझा करने का प्रयास करते समय चेहरे का सत्यापन विफल हो गया है।",
"QRLOGIN_SUCCESFULL": "{{idType}} का उपयोग करके QRLogin सफल रहा।",
"WALLET_BINDING_SUCCESSFULL": "{{idType}} का सक्रियण सफल रहा।",
"WALLET_BINDING_FAILURE": "{{idType}} का सक्रियण विफल हो गया।",
"VC_REMOVED": "{{idType}} को वॉलेट से हटा दिया गया।",
"TAMPERED_VC_REMOVED": "{{idType}} को छेड़छाड़ के कारण वॉलेट से हटा दिया गया।",
"vpSharing": {
"SHARED_SUCCESSFULLY": "क्रेडेंशियल प्रेजेंटेशन सफलतापूर्वक साझा किया गया है.",
"SHARED_WITH_FACE_VERIFIACTION": "चेहरा सत्यापन सफल है, और क्रेडेंशियल प्रस्तुति सफलतापूर्वक साझा की गई है।",
@@ -69,6 +69,7 @@
"generatedOn": "पर उत्पन्न हुआ",
"status": "दर्जा",
"valid": "वैध",
"expired": "खत्म हो चुका",
"pending": "लंबित",
"photo": "फ़ोटो",
"fullName": "पूरा नाम",
@@ -82,6 +83,7 @@
"id": "पहचान",
"qrCodeHeader": "क्यू आर संहिता",
"nationalCard": "राष्ट्रीय पहचान पत्र",
"identityCard": "पहचान पत्र",
"insuranceCard": "बीमा कार्ड",
"beneficiaryCard": "लाभार्थी कार्ड",
"socialRegistryCard": "सामाजिक रजिस्ट्री कार्ड",
@@ -158,7 +160,8 @@
"downloaded": "डाउनलोड",
"shared": "साझा",
"received": "प्राप्त",
"deleted": "हटाए गए"
"deleted": "हटाए गए",
"historyHeaderLabel":"इतिहास"
},
"SettingScreen": {
"header": "समायोजन",
@@ -182,14 +185,15 @@
"keyPreferenceError": "माफ़ कीजिये! आपकी कुंजी प्राथमिकताएँ सेट करने में त्रुटि हुई है"
},
"AboutInji": {
"aboutInji": "इंजी के बारे में",
"header": "इंजी के बारे में",
"aboutInji": "इंजी वॉलेट के बारे में",
"header": "इंजी वॉलेट के बारे में",
"appID": "ऐप ID",
"aboutDetails": "इंजी एक मोबाइल ऐप है जिसे क्रेडेंशियल स्टोर करने के लिए डिजिटल वॉलेट के रूप में इस्तेमाल किया जा सकता है। यह किसी भी स्थान और समय पर ऑफ़लाइन और ऑनलाइन दोनों तरीकों से पहचान के सत्यापन की अनुमति देता है।",
"aboutDetails": "इंजी वॉलेट डेटा को भरोसेमंद और पोर्टेबल बनाता है, जिसमें दो मुख्य इंटरफेस हैं जो विभिन्न उपयोगकर्ता आवश्यकताओं को पूरा करते हैं, जिनमें से इंजी मोबाइल उनमें से एक है। मोबाइल-आधारित वॉलेट ऐप के रूप में,ंजी मोबाइल एक सुरक्षित, विकेन्द्रीकृत समाधान है जो उपयोगकर्ताओं को अपने स्मार्टफोन से सीधे सत्यापन योग्य क्रेडेंशियल्स को डाउनलोड करने, प्रबंधित करने, साझा करने और सत्यापित करने की अनुमति देता है, जो चलते-फिरते क्रेडेंशियल्स को संभालने का एक सहज और भरोसेमंद तरीका प्रदान करता है।",
"forMoreDetails": "अधिक जानकारी के लिए",
"clickHere": "यहाँ क्लिक करें",
"version": "संस्करण",
"tuvaliVersion": "तुवाली-संस्करण"
"tuvaliVersion": "तुवाली-संस्करण",
"poweredBy": "इंजी द्वारा संचालित, एक MOSIP उत्पाद"
},
"IssuersScreen": {
"title": "नया कार्ड जोड़ें",
@@ -222,6 +226,10 @@
"title": "एक त्रुटि पाई गई!",
"message": "आपके धैर्य के लिए धन्यवाद! हम अभी तकनीकी समस्याओं का सामना कर रहे हैं। कृपया बाद में पुनः प्रयास करें या आगे की सहायता के लिए व्यवस्थापक से संपर्क करें!"
},
"authorizationGrantTypeNotSupportedByWallet": {
"title": "अनुदान प्रकार समर्थित नहीं प्राधिकरण त्रुटि!",
"message": "आपके धैर्य के लिए धन्यवाद! हम अभी तकनीकी समस्याओं का सामना कर रहे हैं। कृपया बाद में पुनः प्रयास करें या आगे की सहायता के लिए व्यवस्थापक से संपर्क करें!"
},
"verificationFailed": {
"title": "एक त्रुटि पाई गई!",
"goBackButton": "वापस जाओ",

View File

@@ -1,20 +1,20 @@
{
"ActivityLogText": {
"VC_SHARED": "{{idType}} {{id}} ಅನ್ನು ಯಶಸ್ವಿಯಾಗಿ ಹಂಚಿಕೊಳ್ಳಲಾಗಿದೆ.",
"VC_RECEIVED": "{{idType}} {{id}} ಸ್ವೀಕರಿಸಲಾಗಿದೆ.",
"VC_RECEIVED_NOT_SAVED": "{{idType}} {{id}} ಉಳಿಸಲು ಸಾಧ್ಯವಾಗಲಿಲ್ಲ.",
"VC_DELETED": "{{idType}} {{id}} ಯಶಸ್ವಿಯಾಗಿ ಅಳಿಸಲಾಗಿದೆ.",
"VC_DOWNLOADED": "{{idType}} {{id}} ಡೌನ್‌ಲೋಡ್ ಮಾಡಲಾಗಿದೆ.",
"VC_SHARED_WITH_VERIFICATION_CONSENT": "ಹಾಜರಿ ಪರಿಶೀಲನೆಗಾಗಿ {{idType}} {{id}} ಅನುಮತಿಯೊಂದಿಗೆ ಹಂಚಲಾಗಿದೆ.",
"VC_RECEIVED_WITH_PRESENCE_VERIFIED": "{{idType}} {{id}} ಸ್ವೀಕರಿಸಲಾಗಿದೆ ಮತ್ತು ಹಾಜರಿ ಪರಿಶೀಲನೆ ಯಶಸ್ವಿಯಾಗಿದೆ.",
"VC_RECEIVED_BUT_PRESENCE_VERIFICATION_FAILED": "{{idType}} {{id}} ಸ್ವೀಕರಿಸಲಾಗಿದೆ ಆದರೆ ಹಾಜರಿ ಪರಿಶೀಲನೆ ವಿಫಲವಾಗಿದೆ.",
"PRESENCE_VERIFIED_AND_VC_SHARED": "ಮುಖ ಪರಿಶೀಲನೆ ಯಶಸ್ವಿಯಾಗಿದೆ ಮತ್ತು {{idType}} {{id}} ಅನ್ನು ಹಂಚಿಕೊಳ್ಳಲಾಗಿದೆ.",
"PRESENCE_VERIFICATION_FAILED": "{{idType}} {{id}} ಅನ್ನು ಹಂಚಿಕೊಳ್ಳಲು ಪ್ರಯತ್ನಿಸುವಾಗ ಮುಖ ಪರಿಶೀಲನೆ ವಿಫಲವಾಗಿದೆ.",
"QRLOGIN_SUCCESFULL": "{{idType}} {{id}} ಬಳಸಿ QRಲಾಗಿನ್ ಯಶಸ್ವಿಯಾಗಿದೆ.",
"WALLET_BINDING_SUCCESSFULL": "{{idType}} {{id}} ಸಕ್ರಿಯಗೊಳಿಸುವಿಕೆ ಯಶಸ್ವಿಯಾಗಿದೆ.",
"WALLET_BINDING_FAILURE": "{{idType}} {{id}} ಸಕ್ರಿಯಗೊಳಿಸುವಿಕೆ ವಿಫಲವಾಗಿದೆ.",
"VC_REMOVED": "{{idType}} {{id}} ವಾಲೆಟ್‌ನಿಂದ ತೆಗೆದುಹಾಕಲಾಗಿದೆ.",
"TAMPERED_VC_REMOVED": "ತಿದ್ದುವಿಕೆಯಿಂದಾಗಿ {{idType}} {{id}} ಅನ್ನು ವ್ಯಾಲೆಟ್‌ನಿಂದ ತೆಗೆದುಹಾಕಲಾಗಿದೆ.",
"VC_SHARED": "{{idType}} ಅನ್ನು ಯಶಸ್ವಿಯಾಗಿ ಹಂಚಿಕೊಳ್ಳಲಾಗಿದೆ.",
"VC_RECEIVED": "{{idType}} ಸ್ವೀಕರಿಸಲಾಗಿದೆ.",
"VC_RECEIVED_NOT_SAVED": "{{idType}} ಉಳಿಸಲು ಸಾಧ್ಯವಾಗಲಿಲ್ಲ.",
"VC_DELETED": "{{idType}} ಯಶಸ್ವಿಯಾಗಿ ಅಳಿಸಲಾಗಿದೆ.",
"VC_DOWNLOADED": "{{idType}} ಡೌನ್‌ಲೋಡ್ ಮಾಡಲಾಗಿದೆ.",
"VC_SHARED_WITH_VERIFICATION_CONSENT": "ಹಾಜರಿ ಪರಿಶೀಲನೆಗಾಗಿ {{idType}} ಅನುಮತಿಯೊಂದಿಗೆ ಹಂಚಲಾಗಿದೆ.",
"VC_RECEIVED_WITH_PRESENCE_VERIFIED": "{{idType}} ಸ್ವೀಕರಿಸಲಾಗಿದೆ ಮತ್ತು ಹಾಜರಿ ಪರಿಶೀಲನೆ ಯಶಸ್ವಿಯಾಗಿದೆ.",
"VC_RECEIVED_BUT_PRESENCE_VERIFICATION_FAILED": "{{idType}} ಸ್ವೀಕರಿಸಲಾಗಿದೆ ಆದರೆ ಹಾಜರಿ ಪರಿಶೀಲನೆ ವಿಫಲವಾಗಿದೆ.",
"PRESENCE_VERIFIED_AND_VC_SHARED": "ಮುಖ ಪರಿಶೀಲನೆ ಯಶಸ್ವಿಯಾಗಿದೆ ಮತ್ತು {{idType}} ಅನ್ನು ಹಂಚಿಕೊಳ್ಳಲಾಗಿದೆ.",
"PRESENCE_VERIFICATION_FAILED": "{{idType}} ಅನ್ನು ಹಂಚಿಕೊಳ್ಳಲು ಪ್ರಯತ್ನಿಸುವಾಗ ಮುಖ ಪರಿಶೀಲನೆ ವಿಫಲವಾಗಿದೆ.",
"QRLOGIN_SUCCESFULL": "{{idType}} ಬಳಸಿ QRಲಾಗಿನ್ ಯಶಸ್ವಿಯಾಗಿದೆ.",
"WALLET_BINDING_SUCCESSFULL": "{{idType}} ಸಕ್ರಿಯಗೊಳಿಸುವಿಕೆ ಯಶಸ್ವಿಯಾಗಿದೆ.",
"WALLET_BINDING_FAILURE": "{{idType}} ಸಕ್ರಿಯಗೊಳಿಸುವಿಕೆ ವಿಫಲವಾಗಿದೆ.",
"VC_REMOVED": "{{idType}} ವಾಲೆಟ್‌ನಿಂದ ತೆಗೆದುಹಾಕಲಾಗಿದೆ.",
"TAMPERED_VC_REMOVED": "ತಿದ್ದುವಿಕೆಯಿಂದಾಗಿ {{idType}} ಅನ್ನು ವ್ಯಾಲೆಟ್‌ನಿಂದ ತೆಗೆದುಹಾಕಲಾಗಿದೆ.",
"vpSharing": {
"SHARED_SUCCESSFULLY": "ರುಜುವಾತು ಪ್ರಸ್ತುತಿಯನ್ನು ಯಶಸ್ವಿಯಾಗಿ ಹಂಚಿಕೊಳ್ಳಲಾಗಿದೆ.",
"SHARED_WITH_FACE_VERIFIACTION": "ಮುಖ ಪರಿಶೀಲನೆ ಯಶಸ್ವಿಯಾಗಿದೆ ಮತ್ತು ರುಜುವಾತು ಪ್ರಸ್ತುತಿಯನ್ನು ಯಶಸ್ವಿಯಾಗಿ ಹಂಚಿಕೊಳ್ಳಲಾಗಿದೆ.",
@@ -69,6 +69,7 @@
"generatedOn": "ಜನರೇಟೆಡ್ ಆನ್",
"status": "ಸ್ಥಿತಿ",
"valid": "ಮಾನ್ಯ",
"expired": "ಅವಧಿ ಮೀರಿದೆ",
"pending": "ಬಾಕಿಯಿದೆ",
"photo": "ಫೋಟೋ",
"fullName": "ಪೂರ್ಣ ಹೆಸರು",
@@ -82,6 +83,7 @@
"id": "ಐಡಿ",
"qrCodeHeader": "QR ಕೋಡ್",
"nationalCard": "ರಾಷ್ಟ್ರೀಯ ಗುರುತು",
"identityCard": "ಗುರುತಿನ ಚೀಟಿ",
"insuranceCard": "ವಿಮಾ ಕಾರ್ಡ್",
"beneficiaryCard": "ಫಲಾನುಭವಿ ಕಾರ್ಡ್",
"socialRegistryCard": "ಸಾಮಾಜಿಕ ನೋಂದಣಿ ಕಾರ್ಡ್",
@@ -157,7 +159,8 @@
"downloaded": "ಸಿಕ್ಕಿತು",
"shared": "ಹಂಚಿಕೊಂಡಿದ್ದಾರೆ",
"received": "ಸ್ವೀಕರಿಸಿದರು",
"deleted": "ತೆಗೆದುಹಾಕಲಾಗಿದೆ"
"deleted": "ತೆಗೆದುಹಾಕಲಾಗಿದೆ",
"historyHeaderLabel": "ಇತಿಹಾಸ"
},
"SettingScreen": {
"header": "ಸಂಯೋಜನೆಗಳು",
@@ -181,14 +184,15 @@
"keyPreferenceError": "ಕ್ಷಮಿಸಿ! ನಿಮ್ಮ ಪ್ರಮುಖ ಆದ್ಯತೆಗಳನ್ನು ಹೊಂದಿಸುವಲ್ಲಿ ದೋಷ ಕಂಡುಬಂದಿದೆ."
},
"AboutInji": {
"aboutInji": "ಇಂಜಿ ಬಗ್ಗೆ",
"header": "ಇಂಜಿ ಬಗ್ಗೆ",
"aboutInji": "ಇಂಜಿ ವಾಲೆಟ್ ಬಗ್ಗೆ",
"header": "ಇಂಜಿ ವಾಲೆಟ್ ಬಗ್ಗೆ",
"appID": "ಆಪ್ ID",
"aboutDetails": "ಇಂಜಿ ಎನ್ನುವುದು ರುಜುವಾತುಗಳನ್ನು ಸಂಗ್ರಹಿಸಲು ಡಿಜಿಟಲ್ ವ್ಯಾಲೆಟ್ ಆಗಿ ಬಳಸಬಹುದಾದ ಮೊಬೈಲ್ ಅಪ್ಲಿಕೇಶನ್ ಆಗಿದೆ. ಇದು ಯಾವುದೇ ಸ್ಥಳ ಮತ್ತು ಸಮಯದಲ್ಲಿ ಆಫ್‌ಲೈನ್ ಮತ್ತು ಆನ್‌ಲೈನ್ ಮೋಡ್‌ಗಳಲ್ಲಿ ಗುರುತಿನ ಪರಿಶೀಲನೆಯನ್ನು ಅನುಮತಿಸುತ್ತದೆ.",
"aboutDetails": "Inji Wallet ಡೇಟಾವನ್ನು ನಂಬಲರ್ಹ ಮತ್ತು ಪೋರ್ಟಬಲ್ ಮಾಡುತ್ತದೆ, ವೈವಿಧ್ಯಮಯ ಬಳಕೆದಾರ ಅಗತ್ಯಗಳನ್ನು ಪೂರೈಸುವ ಎರಡು ಮುಖ್ಯ ಇಂಟರ್ಫೇಸ್‌ಗಳನ್ನು ಒಳಗೊಂಡಿರುತ್ತದೆ, Inji Mobile ಅವುಗಳಲ್ಲಿ ಒಂದಾಗಿದೆ. ಮೊಬೈಲ್ ಆಧಾರಿತ ವ್ಯಾಲೆಟ್ ಅಪ್ಲಿಕೇಶನ್‌ನಂತೆ, Inji Mobile ಸುರಕ್ಷಿತ, ವಿಕೇಂದ್ರೀಕೃತ ಪರಿಹಾರವಾಗಿದ್ದು, ಬಳಕೆದಾರರು ತಮ್ಮ ಸ್ಮಾರ್ಟ್‌ಫೋನ್‌ಗಳಿಂದ ನೇರವಾಗಿ ಪರಿಶೀಲಿಸಬಹುದಾದ ರುಜುವಾತುಗಳನ್ನು ಡೌನ್‌ಲೋಡ್ ಮಾಡಲು, ನಿರ್ವಹಿಸಲು, ಹಂಚಿಕೊಳ್ಳಲು ಮತ್ತು ಪರಿಶೀಲಿಸಲು ಅನುಮತಿಸುತ್ತದೆ, ಪ್ರಯಾಣದಲ್ಲಿರುವಾಗ ರುಜುವಾತುಗಳನ್ನು ನಿರ್ವಹಿಸಲು ತಡೆರಹಿತ ಮತ್ತು ವಿಶ್ವಾಸಾರ್ಹ ಮಾರ್ಗವನ್ನು ಒದಗಿಸುತ್ತದೆ.",
"forMoreDetails": "ಹೆಚ್ಚಿನ ವಿವರಗಳಿಗಾಗಿ",
"clickHere": "ಇಲ್ಲಿ ಕ್ಲಿಕ್ ಮಾಡಿ",
"version": "ಆವೃತ್ತಿ",
"tuvaliVersion": "ಟುವಾಲಿ-ಆವೃತ್ತಿ"
"tuvaliVersion": "ಟುವಾಲಿ-ಆವೃತ್ತಿ",
"poweredBy": "ಇಂಜಿಯಿಂದ ನಡೆಸಲ್ಪಡುತ್ತಿದೆ, ಒಂದು MOSIP ಉತ್ಪನ್ನ"
},
"IssuersScreen": {
"title": "ಹೊಸ ಕಾರ್ಡ್ ಸೇರಿಸಿ",
@@ -221,6 +225,10 @@
"title": "ದೋಷ ಸಂಭವಿಸಿದೆ!",
"message": "ನಿಮ್ಮ ತಾಳ್ಮೆಗೆ ಧನ್ಯವಾದಗಳು! ನಾವು ಇದೀಗ ತಾಂತ್ರಿಕ ತೊಂದರೆಗಳನ್ನು ಎದುರಿಸುತ್ತಿದ್ದೇವೆ. ದಯವಿಟ್ಟು ನಂತರ ಮತ್ತೆ ಪ್ರಯತ್ನಿಸಿ ಅಥವಾ ಹೆಚ್ಚಿನ ಸಹಾಯಕ್ಕಾಗಿ ನಿರ್ವಾಹಕರನ್ನು ಸಂಪರ್ಕಿಸಿ!"
},
"authorizationGrantTypeNotSupportedByWallet": {
"title": "ಅನುದಾನದ ಪ್ರಕಾರವನ್ನು ಬೆಂಬಲಿಸುವುದಿಲ್ಲ ದೃಢೀಕರಣ ದೋಷ!",
"message": "ನಿಮ್ಮ ತಾಳ್ಮೆಗೆ ಧನ್ಯವಾದಗಳು! ನಾವು ಇದೀಗ ತಾಂತ್ರಿಕ ತೊಂದರೆಗಳನ್ನು ಎದುರಿಸುತ್ತಿದ್ದೇವೆ. ದಯವಿಟ್ಟು ನಂತರ ಮತ್ತೆ ಪ್ರಯತ್ನಿಸಿ ಅಥವಾ ಹೆಚ್ಚಿನ ಸಹಾಯಕ್ಕಾಗಿ ನಿರ್ವಾಹಕರನ್ನು ಸಂಪರ್ಕಿಸಿ!"
},
"verificationFailed": {
"title": "ಒಂದು ತಪ್ಪು ನಡೆದಿದೆ!",
"goBackButton": "ಹಿಂದೆ ಹೋಗು",

View File

@@ -1,20 +1,20 @@
{
"ActivityLogText": {
"VC_SHARED": "{{idType}} {{id}} வெற்றிகரமாகப் பகிரப்பட்டது.",
"VC_RECEIVED": "{{idType}} {{id}} பெறப்பட்டது.",
"VC_RECEIVED_NOT_SAVED": "{{idType}} {{id}} ஐச் சேமிக்க முடியவில்லை.",
"VC_DELETED": "{{idType}} {{id}} வெற்றிகரமாக நீக்கப்பட்டது.",
"VC_DOWNLOADED": "{{idType}} {{id}} பதிவிறக்கம் செய்யப்பட்டது.",
"VC_SHARED_WITH_VERIFICATION_CONSENT": " {{idType}} {{id}} ஐ சரிபார்ப்புக்காக அனுமதியுடன் பகிரப்பட்டது.",
"VC_RECEIVED_WITH_PRESENCE_VERIFIED": "{{idType}} {{id}} பெறப்பட்டது மற்றும் இருப்புச் சரிபார்ப்பு வெற்றிகரமானது.",
"VC_RECEIVED_BUT_PRESENCE_VERIFICATION_FAILED": "{{idType}} {{id}} பெறப்பட்டது, ஆனால் இருப்புச் சரிபார்ப்பு தோல்வியடைந்தது.",
"PRESENCE_VERIFIED_AND_VC_SHARED": "முகம் சரிபார்ப்பு வெற்றிகரமாக உள்ளது மற்றும் {{idType}} {{id}} பகிரப்பட்டது.",
"PRESENCE_VERIFICATION_FAILED": "{{idType}} {{id}}ஐப் பகிர முயற்சிக்கும் போது முகம் சரிபார்ப்பு தோல்வியடைந்தது.",
"QRLOGIN_SUCCESFULL": "{{idType}} {{id}} ஐப் பயன்படுத்தி QRLogin வெற்றிகரமானது.",
"WALLET_BINDING_SUCCESSFULL": "{{idType}} {{id}} செயல்படுத்தல் வெற்றிகரமானது.",
"WALLET_BINDING_FAILURE": "{{idType}} {{id}} செயல்படுத்தல் தோல்வியடைந்தது.",
"VC_REMOVED": "{{idType}} {{id}} பணப்பையிலிருந்து நீக்கப்பட்டது.",
"TAMPERED_VC_REMOVED": "{{idType}} {{id}} த篡றுத்தல் காரணமாக பணப்பையிலிருந்து நீக்கப்பட்டது.",
"VC_SHARED": "{{idType}} வெற்றிகரமாகப் பகிரப்பட்டது.",
"VC_RECEIVED": "{{idType}} பெறப்பட்டது.",
"VC_RECEIVED_NOT_SAVED": "{{idType}} ஐச் சேமிக்க முடியவில்லை.",
"VC_DELETED": "{{idType}} வெற்றிகரமாக நீக்கப்பட்டது.",
"VC_DOWNLOADED": "{{idType}} பதிவிறக்கம் செய்யப்பட்டது.",
"VC_SHARED_WITH_VERIFICATION_CONSENT": " {{idType}} ஐ சரிபார்ப்புக்காக அனுமதியுடன் பகிரப்பட்டது.",
"VC_RECEIVED_WITH_PRESENCE_VERIFIED": "{{idType}} பெறப்பட்டது மற்றும் இருப்புச் சரிபார்ப்பு வெற்றிகரமானது.",
"VC_RECEIVED_BUT_PRESENCE_VERIFICATION_FAILED": "{{idType}} பெறப்பட்டது, ஆனால் இருப்புச் சரிபார்ப்பு தோல்வியடைந்தது.",
"PRESENCE_VERIFIED_AND_VC_SHARED": "முகம் சரிபார்ப்பு வெற்றிகரமாக உள்ளது மற்றும் {{idType}} பகிரப்பட்டது.",
"PRESENCE_VERIFICATION_FAILED": "{{idType}}ஐப் பகிர முயற்சிக்கும் போது முகம் சரிபார்ப்பு தோல்வியடைந்தது.",
"QRLOGIN_SUCCESFULL": "{{idType}} ஐப் பயன்படுத்தி QRLogin வெற்றிகரமானது.",
"WALLET_BINDING_SUCCESSFULL": "{{idType}} செயல்படுத்தல் வெற்றிகரமானது.",
"WALLET_BINDING_FAILURE": "{{idType}} செயல்படுத்தல் தோல்வியடைந்தது.",
"VC_REMOVED": "{{idType}} பணப்பையிலிருந்து நீக்கப்பட்டது.",
"TAMPERED_VC_REMOVED": "{{idType}} த篡றுத்தல் காரணமாக பணப்பையிலிருந்து நீக்கப்பட்டது.",
"vpSharing": {
"SHARED_SUCCESSFULLY": "நற்சான்றிதழ் வழங்கல் வெற்றிகரமாகப் பகிரப்பட்டது.",
"SHARED_WITH_FACE_VERIFIACTION": "முக சரிபார்ப்பு வெற்றிகரமாக உள்ளது, மேலும் நற்சான்றிதழ் விளக்கக்காட்சி வெற்றிகரமாக பகிரப்பட்டது.",
@@ -69,6 +69,7 @@
"generatedOn": "உருவாக்கப்பட்டது",
"status": "நிலை",
"valid": "செல்லுபடியாகும்",
"expired": "காலாவதியானது",
"pending": "நிலுவையில் உள்ளது",
"photo": "புகைப்படம்",
"fullName": "முழு பெயர்",
@@ -82,6 +83,7 @@
"id": "ஐடி",
"qrCodeHeader": "க்யு ஆர் குறியீடு",
"nationalCard": "தேசிய ஐடி",
"identityCard": "அடையாள அட்டை",
"insuranceCard": "காப்பீட்டு அட்டை",
"beneficiaryCard": "பயனாளி அட்டை",
"socialRegistryCard": "சமூக பதிவு அட்டை",
@@ -157,7 +159,8 @@
"downloaded": "கிடைத்தது",
"shared": "பகிர்ந்து கொண்டார்",
"received": "பெற்றது",
"deleted": "அகற்றப்பட்டது"
"deleted": "அகற்றப்பட்டது",
"historyHeaderLabel": "வரலாறு"
},
"SettingScreen": {
"header": "அமைப்புகள்",
@@ -181,14 +184,15 @@
"keyPreferenceError": "மன்னிக்கவும்! உங்கள் கீ முன்னுரிமைகளை அமைப்பதில் பிழை ஏற்பட்டது"
},
"AboutInji": {
"aboutInji": "இன்ஜி பற்றி",
"header": "இன்ஜி பற்றி",
"aboutInji": "இன்ஜி வாலட் பற்றி",
"header": "இன்ஜி வாலட் பற்றி",
"appID": "பயன்பாடாகும் ID",
"aboutDetails": "இன்ஜி என்பது ஒரு மொபைல் பயன்பாடாகும், இது நற்சான்றிதழ்களைச் சேமிக்க டிஜிட்டல் பணப்பையாகப் பயன்படுத்தப்படலாம். எந்த இடத்திலும் நேரத்திலும், ஆஃப்லைன் மற்றும் ஆன்லைன் முறைகள் இரண்டிலும் அடையாச் சரிபார்ப்பை இது அனுமதிக்கிறது.",
"aboutDetails": "இன்ஜி வாலட் தரவை நம்பகமானதாகவும், எடுத்துச் செல்லக்கூடியதாகும் ஆக்குகிறது, பல்வேறு பயனர் தேவைகளைப் பூர்த்தி செய்யும் இரண்டு முக்கிய இடைமுகங்களைக் கொண்டுள்ளது, இன்ஜி மொபைல் அவற்றில் ஒன்றாகும். மொபைல் அடிப்பையிலான வாலட் பயன்பாடாக, இன்ஜி மொபைல் என்பது பாதுகாப்பான, பரவலாக்கப்பட்ட தீர்வாகும், இது பயனர்கள் தங்கள் ஸ்மார்ட்போன்களில் இருந்து நேரடியாச் சரிபார்க்கக்கூடிய சான்றுகளை பதிவிறக்கம் செய்து, நிர்வகிக்க, பகிர மற்றும் சரிபார்க்க அனுமதிக்கிறது, பயணத்தின்போது நற்சான்றிதழ்களைக் கையாள தடையற்ற மற்றும் நம்பகமான வழியை வழங்குகிறது.",
"forMoreDetails": "மேலும் விவரங்களுக்கு",
"clickHere": "இங்கே கிளிக் செய்யவும்",
"version": "பதிப்பு",
"tuvaliVersion": "துவாலி-பதிப்பு"
"tuvaliVersion": "துவாலி-பதிப்பு",
"poweredBy": "இன்ஜி மூலம் இயக்கப்படுகிறது, ஒரு MOSIP தயாரிப்பு"
},
"IssuersScreen": {
"title": "புதிய அட்டையைச் சேர்க்கவும்",
@@ -221,6 +225,10 @@
"title": "பிழை ஏற்பட்டது!",
"message": "உங்கள் பொறுமைக்கு நன்றி! நாங்கள் தற்போது தொழில்நுட்ப சிக்கல்களை எதிர்கொள்கிறோம். பிறகு முயற்சிக்கவும் அல்லது கூடுதல் உதவிக்கு நிர்வாகியைத் தொடர்பு கொள்ளவும்!"
},
"authorizationGrantTypeNotSupportedByWallet": {
"title": "கிராண்ட் வகை ஆதரிக்கப்படவில்லை அங்கீகார பிழை!",
"message": "உங்கள் பொறுமைக்கு நன்றி! நாங்கள் தற்போது தொழில்நுட்ப சிக்கல்களை எதிர்கொள்கிறோம். பிறகு முயற்சிக்கவும் அல்லது கூடுதல் உதவிக்கு நிர்வாகியைத் தொடர்பு கொள்ளவும்!"
},
"verificationFailed": {
"title": "ஒரு பிழை ஏற்பட்டது!",
"goBackButton": "திரும்பி செல்",

View File

@@ -1,6 +1,7 @@
import {
ErrorMessage,
Issuers_Key_Ref,
OIDCErrors,
selectCredentialRequestKey,
} from '../../shared/openId4VCI/Utils';
import {
@@ -8,6 +9,7 @@ import {
NETWORK_REQUEST_FAILED,
REQUEST_TIMEOUT,
isIOS,
EXPIRED_VC_ERROR_CODE,
} from '../../shared/constants';
import {assign, send} from 'xstate';
import {StoreEvents} from '../store';
@@ -29,18 +31,20 @@ import {VCActivityLog} from '../../components/ActivityLogEvent';
const {RNSecureKeystoreModule} = NativeModules;
export const IssuersActions = (model: any) => {
return {
setIsVerified: assign({
vcMetadata: (context: any) =>
setVerificationResult: assign({
vcMetadata: (context: any, event: any) =>
new VCMetadata({
...context.vcMetadata,
isVerified: true,
isExpired: event.data.verificationErrorCode == EXPIRED_VC_ERROR_CODE,
}),
}),
resetIsVerified: assign({
resetVerificationResult: assign({
vcMetadata: (context: any) =>
new VCMetadata({
...context.vcMetadata,
isVerified: false,
isExpired: false,
}),
}),
setIssuers: model.assign({
@@ -100,7 +104,7 @@ export const IssuersActions = (model: any) => {
setError: model.assign({
errorMessage: (_: any, event: any) => {
console.error('Error occurred ', event.data.message);
console.error(`Error occurred while ${event} -> `, event.data.message);
const error = event.data.message;
if (error.includes(NETWORK_REQUEST_FAILED)) {
return ErrorMessage.NO_INTERNET;
@@ -108,6 +112,9 @@ export const IssuersActions = (model: any) => {
if (error.includes(REQUEST_TIMEOUT)) {
return ErrorMessage.REQUEST_TIMEDOUT;
}
if (error.includes(OIDCErrors.AUTHORIZATION_ENDPOINT_DISCOVERY.GRANT_TYPE_NOT_SUPPORTED)) {
return ErrorMessage.AUTHORIZATION_GRANT_TYPE_NOT_SUPPORTED;
}
return ErrorMessage.GENERIC;
},
}),
@@ -236,7 +243,13 @@ export const IssuersActions = (model: any) => {
credential_endpoint: event.data.credential_endpoint,
credential_configurations_supported:
event.data.credential_configurations_supported,
authorization_servers: event.data.authorization_servers,
}),
}),
updateAuthorizationEndpoint: model.assign({
selectedIssuer: (context: any, event: any) => ({
...context.selectedIssuer,
authorizationEndpoint: event.data,
}),
}),
@@ -279,7 +292,6 @@ export const IssuersActions = (model: any) => {
VCActivityLog.getLogFromObject({
_vcKey: vcMetadata.getVcKey(),
type: 'VC_DOWNLOADED',
id: vcMetadata.displayId,
timestamp: Date.now(),
deviceName: '',
issuer: context.selectedIssuerId,

View File

@@ -33,7 +33,14 @@ export const IssuersGuards = () => {
return (
!!event.data &&
typeof event.data.toString === 'function' &&
event.data.toString().includes(OIDCErrors.OIDC_CONFIG_ERROR_PREFIX)
event.data.toString()(OIDCErrors.OIDC_CONFIG_ERROR_PREFIX)
);
},
isGrantTypeNotSupportedError: (_: any, event: any) => {
return (
!!event.data &&
event.data.toString() ===
OIDCErrors.AUTHORIZATION_ENDPOINT_DISCOVERY.GRANT_TYPE_NOT_SUPPORTED
);
},
canSelectIssuerAgain: (context: any) => {

View File

@@ -142,7 +142,46 @@ export const IssuersMachine = model.createMachine(
},
SELECTED_CREDENTIAL_TYPE: {
actions: 'setSelectedCredentialType',
target: 'checkInternet',
target: 'fetchAuthorizationEndpoint',
},
},
},
fetchAuthorizationEndpoint: {
invoke: {
src: 'fetchAuthorizationEndpoint',
onDone: [
{
actions: 'updateAuthorizationEndpoint',
target: 'checkInternet',
},
],
onError: {
actions: ['setError', 'resetLoadingReason'],
target: '.error',
},
},
initial: 'idle',
states: {
idle: {},
error: {
on: {
TRY_AGAIN: [
{
description:
'issuer and credential type is selected by the user',
actions: ['setLoadingReasonAsSettingUp', 'resetError'],
target: '#issuersMachine.fetchAuthorizationEndpoint',
},
],
RESET_ERROR: [
{
description:
'issuer and credential type is selected by the user',
actions: ['setLoadingReasonAsSettingUp', 'resetError'],
target: '#issuersMachine.selectingCredentialType',
},
],
},
},
},
},
@@ -394,14 +433,14 @@ export const IssuersMachine = model.createMachine(
src: 'verifyCredential',
onDone: [
{
actions: ['sendSuccessEndEvent', 'setIsVerified'],
actions: ['sendSuccessEndEvent', 'setVerificationResult'],
target: 'storing',
},
],
onError: [
{
cond: 'isVerificationPendingBecauseOfNetworkIssue',
actions: ['resetLoadingReason', 'resetIsVerified'],
actions: ['resetLoadingReason', 'resetVerificationResult'],
target: 'storing',
},
{
@@ -483,7 +522,6 @@ export interface displayType {
}
export interface issuerType {
authorization_servers: [string];
credential_issuer: string;
protocol: string;
client_id: string;
@@ -496,4 +534,5 @@ export interface issuerType {
credential_configurations_supported: object;
display: [displayType];
credentialTypes: [CredentialTypes];
authorizationEndpoint: string;
}

View File

@@ -33,6 +33,11 @@ export interface Typegen0 {
data: unknown;
__tip: 'See the XState TS docs to learn how to strongly type this.';
};
'done.invoke.issuersMachine.fetchAuthorizationEndpoint:invocation[0]': {
type: 'done.invoke.issuersMachine.fetchAuthorizationEndpoint:invocation[0]';
data: unknown;
__tip: 'See the XState TS docs to learn how to strongly type this.';
};
'done.invoke.issuersMachine.generateKeyPair:invocation[0]': {
type: 'done.invoke.issuersMachine.generateKeyPair:invocation[0]';
data: unknown;
@@ -83,6 +88,10 @@ export interface Typegen0 {
type: 'error.platform.issuersMachine.downloadIssuerWellknown:invocation[0]';
data: unknown;
};
'error.platform.issuersMachine.fetchAuthorizationEndpoint:invocation[0]': {
type: 'error.platform.issuersMachine.fetchAuthorizationEndpoint:invocation[0]';
data: unknown;
};
'error.platform.issuersMachine.performAuthorization.getKeyPairFromKeystore:invocation[0]': {
type: 'error.platform.issuersMachine.performAuthorization.getKeyPairFromKeystore:invocation[0]';
data: unknown;
@@ -107,6 +116,7 @@ export interface Typegen0 {
downloadCredentialTypes: 'done.invoke.issuersMachine.downloadCredentialTypes:invocation[0]';
downloadIssuerWellknown: 'done.invoke.issuersMachine.downloadIssuerWellknown:invocation[0]';
downloadIssuersList: 'done.invoke.issuersMachine.displayIssuers:invocation[0]';
fetchAuthorizationEndpoint: 'done.invoke.issuersMachine.fetchAuthorizationEndpoint:invocation[0]';
generateKeyPair: 'done.invoke.issuersMachine.generateKeyPair:invocation[0]';
getKeyOrderList: 'done.invoke.issuersMachine.performAuthorization.setSelectedKey:invocation[0]';
getKeyPair: 'done.invoke.issuersMachine.performAuthorization.getKeyPairFromKeystore:invocation[0]';
@@ -121,10 +131,10 @@ export interface Typegen0 {
| 'loadKeyPair'
| 'logDownloaded'
| 'resetError'
| 'resetIsVerified'
| 'resetLoadingReason'
| 'resetSelectedCredentialType'
| 'resetVerificationErrorMessage'
| 'resetVerificationResult'
| 'sendBackupEvent'
| 'sendDownloadingFailedToVcMeta'
| 'sendErrorEndEvent'
@@ -134,7 +144,6 @@ export interface Typegen0 {
| 'setCredentialWrapper'
| 'setError'
| 'setFetchWellknownError'
| 'setIsVerified'
| 'setIssuers'
| 'setLoadingReasonAsDisplayIssuers'
| 'setLoadingReasonAsDownloadingCredentials'
@@ -152,11 +161,13 @@ export interface Typegen0 {
| 'setTokenResponse'
| 'setVCMetadata'
| 'setVerifiableCredential'
| 'setVerificationResult'
| 'storeKeyPair'
| 'storeVcMetaContext'
| 'storeVcsContext'
| 'storeVerifiableCredentialData'
| 'storeVerifiableCredentialMeta'
| 'updateAuthorizationEndpoint'
| 'updateIssuerFromWellknown'
| 'updateSelectedIssuerWellknownResponse'
| 'updateVerificationErrorMessage';
@@ -180,6 +191,7 @@ export interface Typegen0 {
| 'downloadCredentialTypes'
| 'downloadIssuerWellknown'
| 'downloadIssuersList'
| 'fetchAuthorizationEndpoint'
| 'generateKeyPair'
| 'getKeyOrderList'
| 'getKeyPair'
@@ -198,7 +210,6 @@ export interface Typegen0 {
| 'RESET_ERROR'
| 'TRY_AGAIN'
| 'error.platform.issuersMachine.performAuthorization:invocation[0]';
resetIsVerified: 'error.platform.issuersMachine.verifyingCredential:invocation[0]';
resetLoadingReason:
| 'RESET_ERROR'
| 'done.invoke.checkInternet'
@@ -206,6 +217,7 @@ export interface Typegen0 {
| 'error.platform.issuersMachine.downloadCredentialTypes:invocation[0]'
| 'error.platform.issuersMachine.downloadCredentials:invocation[0]'
| 'error.platform.issuersMachine.downloadIssuerWellknown:invocation[0]'
| 'error.platform.issuersMachine.fetchAuthorizationEndpoint:invocation[0]'
| 'error.platform.issuersMachine.performAuthorization.getKeyPairFromKeystore:invocation[0]'
| 'error.platform.issuersMachine.performAuthorization.setSelectedKey:invocation[0]'
| 'error.platform.issuersMachine.performAuthorization:invocation[0]'
@@ -217,6 +229,7 @@ export interface Typegen0 {
| 'error.platform.issuersMachine.performAuthorization.setSelectedKey:invocation[0]'
| 'error.platform.issuersMachine.performAuthorization:invocation[0]';
resetVerificationErrorMessage: 'RESET_VERIFY_ERROR';
resetVerificationResult: 'error.platform.issuersMachine.verifyingCredential:invocation[0]';
sendBackupEvent: 'done.invoke.issuersMachine.storing:invocation[0]';
sendDownloadingFailedToVcMeta:
| 'error.platform.issuersMachine.downloadCredentials:invocation[0]'
@@ -231,11 +244,11 @@ export interface Typegen0 {
setError:
| 'error.platform.issuersMachine.displayIssuers:invocation[0]'
| 'error.platform.issuersMachine.downloadCredentials:invocation[0]'
| 'error.platform.issuersMachine.fetchAuthorizationEndpoint:invocation[0]'
| 'error.platform.issuersMachine.performAuthorization.getKeyPairFromKeystore:invocation[0]'
| 'error.platform.issuersMachine.performAuthorization.setSelectedKey:invocation[0]'
| 'error.platform.issuersMachine.performAuthorization:invocation[0]';
setFetchWellknownError: 'error.platform.issuersMachine.downloadIssuerWellknown:invocation[0]';
setIsVerified: 'done.invoke.issuersMachine.verifyingCredential:invocation[0]';
setIssuers: 'done.invoke.issuersMachine.displayIssuers:invocation[0]';
setLoadingReasonAsDisplayIssuers: 'TRY_AGAIN';
setLoadingReasonAsDownloadingCredentials:
@@ -244,6 +257,7 @@ export interface Typegen0 {
| 'done.invoke.issuersMachine.performAuthorization.getKeyPairFromKeystore:invocation[0]'
| 'error.platform.issuersMachine.performAuthorization.getKeyPairFromKeystore:invocation[0]';
setLoadingReasonAsSettingUp:
| 'RESET_ERROR'
| 'SELECTED_ISSUER'
| 'TRY_AGAIN'
| 'done.invoke.issuersMachine.performAuthorization:invocation[0]';
@@ -264,6 +278,7 @@ export interface Typegen0 {
| 'done.invoke.issuersMachine.verifyingCredential:invocation[0]'
| 'error.platform.issuersMachine.verifyingCredential:invocation[0]';
setVerifiableCredential: 'done.invoke.issuersMachine.downloadCredentials:invocation[0]';
setVerificationResult: 'done.invoke.issuersMachine.verifyingCredential:invocation[0]';
storeKeyPair: 'done.invoke.issuersMachine.generateKeyPair:invocation[0]';
storeVcMetaContext:
| 'done.invoke.issuersMachine.verifyingCredential:invocation[0]'
@@ -277,6 +292,7 @@ export interface Typegen0 {
storeVerifiableCredentialMeta:
| 'done.invoke.issuersMachine.verifyingCredential:invocation[0]'
| 'error.platform.issuersMachine.verifyingCredential:invocation[0]';
updateAuthorizationEndpoint: 'done.invoke.issuersMachine.fetchAuthorizationEndpoint:invocation[0]';
updateIssuerFromWellknown: 'done.invoke.issuersMachine.downloadIssuerWellknown:invocation[0]';
updateSelectedIssuerWellknownResponse: 'done.invoke.issuersMachine.downloadIssuerWellknown:invocation[0]';
updateVerificationErrorMessage: 'error.platform.issuersMachine.verifyingCredential:invocation[0]';
@@ -300,14 +316,15 @@ export interface Typegen0 {
};
eventsCausingServices: {
checkInternet:
| 'SELECTED_CREDENTIAL_TYPE'
| 'done.invoke.issuersMachine.downloadCredentialTypes:invocation[0]';
| 'done.invoke.issuersMachine.downloadCredentialTypes:invocation[0]'
| 'done.invoke.issuersMachine.fetchAuthorizationEndpoint:invocation[0]';
downloadCredential:
| 'done.invoke.issuersMachine.checkKeyPair:invocation[0]'
| 'done.invoke.issuersMachine.generateKeyPair:invocation[0]';
downloadCredentialTypes: 'done.invoke.issuersMachine.downloadIssuerWellknown:invocation[0]';
downloadIssuerWellknown: 'SELECTED_ISSUER' | 'TRY_AGAIN';
downloadIssuersList: 'CANCEL' | 'TRY_AGAIN' | 'xstate.init';
fetchAuthorizationEndpoint: 'SELECTED_CREDENTIAL_TYPE';
generateKeyPair: 'done.invoke.issuersMachine.checkKeyPair:invocation[0]';
getKeyOrderList: 'done.invoke.issuersMachine.performAuthorization:invocation[0]';
getKeyPair:
@@ -333,6 +350,9 @@ export interface Typegen0 {
| 'downloadCredentials.userCancelledBiometric'
| 'downloadIssuerWellknown'
| 'error'
| 'fetchAuthorizationEndpoint'
| 'fetchAuthorizationEndpoint.error'
| 'fetchAuthorizationEndpoint.idle'
| 'generateKeyPair'
| 'handleVCVerificationFailure'
| 'idle'
@@ -347,6 +367,7 @@ export interface Typegen0 {
| 'verifyingCredential'
| {
downloadCredentials?: 'idle' | 'userCancelledBiometric';
fetchAuthorizationEndpoint?: 'error' | 'idle';
performAuthorization?:
| 'getKeyPairFromKeystore'
| 'idle'

View File

@@ -6,6 +6,7 @@ import {
constructIssuerMetaData,
constructProofJWT,
hasKeyPair,
OIDCErrors,
updateCredentialInformation,
vcDownloadTimeout,
} from '../../shared/openId4VCI/Utils';
@@ -60,6 +61,31 @@ export const IssuersService = () => {
return credentialTypes;
},
fetchAuthorizationEndpoint: async (context: any) => {
/**
* Incase of multiple entries of authorization_servers, each element is iterated and metadata check is made for support with wallet.
* For now, its been kept as getting first entry and checking for matching grant_types_supported
*/
const authorizationServer =
context.selectedIssuerWellknownResponse['authorization_servers'][0];
const authorizationServerMetadata =
await CACHED_API.fetchIssuerAuthorizationServerMetadata(
authorizationServer,
);
const SUPPORTED_GRANT_TYPES = ['authorization_code'];
if (
(
authorizationServerMetadata['grant_types_supported'] as Array<string>
).filter(grantType => SUPPORTED_GRANT_TYPES.includes(grantType))
.length === 0
) {
throw new Error(
OIDCErrors.AUTHORIZATION_ENDPOINT_DISCOVERY.GRANT_TYPE_NOT_SUPPORTED,
);
}
return authorizationServerMetadata['authorization_endpoint'];
},
downloadCredential: async (context: any) => {
const downloadTimeout = await vcDownloadTimeout();
const accessToken: string = context.tokenResponse?.accessToken;
@@ -137,6 +163,7 @@ export const IssuersService = () => {
if (!verificationResult.isVerified) {
throw new Error(verificationResult.verificationErrorCode);
}
return verificationResult;
} else {
return {
isVerified: true,

View File

@@ -26,7 +26,7 @@ export const QrLoginServices = {
sendAuthenticate: async context => {
let privateKey;
const individualId = context.selectedVc.vcMetadata.displayId;
const individualId = context.selectedVc.vcMetadata.mosipIndividualId;
const keyType = context.selectedVc.vcMetadata.downloadKeyType;
if (!isHardwareKeystoreExists) {
privateKey = await getPrivateKey(

View File

@@ -457,7 +457,6 @@ export const VCItemActions = model => {
VCActivityLog.getLogFromObject({
_vcKey: context.vcMetadata.getVcKey(),
type: 'VC_DOWNLOADED',
id: context.vcMetadata.displayId,
issuer: context.vcMetadata.issuer!!,
credentialConfigurationId:
context.verifiableCredential.credentialConfigurationId,
@@ -478,7 +477,6 @@ export const VCItemActions = model => {
credentialConfigurationId:
context.verifiableCredential.credentialConfigurationId,
issuer: vcMetadata.issuer!!,
id: vcMetadata.displayId,
_vcKey: vcMetadata.getVcKey(),
type: 'VC_REMOVED',
timestamp: Date.now(),
@@ -500,7 +498,6 @@ export const VCItemActions = model => {
credentialConfigurationId:
context.verifiableCredential.credentialConfigurationId,
issuer: vcMetadata.issuer!!,
id: vcMetadata.displayId,
timestamp: Date.now(),
deviceName: '',
}),
@@ -518,7 +515,6 @@ export const VCItemActions = model => {
VCActivityLog.getLogFromObject({
_vcKey: vcMetadata.getVcKey(),
type: 'WALLET_BINDING_FAILURE',
id: vcMetadata.displayId,
credentialConfigurationId:
context.verifiableCredential.credentialConfigurationId,
issuer: vcMetadata.issuer!!,

View File

@@ -59,7 +59,7 @@ export const VCItemServices = model => {
request: {
authFactorType: 'WLA',
format: 'jwt',
individualId: context.vcMetadata.displayId,
individualId: context.vcMetadata.mosipIndividualId,
transactionId: context.bindingTransactionId,
publicKey: context.publicKey,
challengeList: [
@@ -103,7 +103,7 @@ export const VCItemServices = model => {
{
requestTime: String(new Date().toISOString()),
request: {
individualId: context.vcMetadata.displayId,
individualId: context.vcMetadata.mosipIndividualId,
otpChannels: ['EMAIL', 'PHONE'],
},
},
@@ -175,7 +175,7 @@ export const VCItemServices = model => {
API_URLS.credentialDownload.method,
API_URLS.credentialDownload.buildURL(),
{
individualId: context.vcMetadata.displayId,
individualId: context.vcMetadata.mosipIndividualId,
requestId: context.vcMetadata.requestId,
},
);

View File

@@ -65,6 +65,7 @@ const model = createModel(
STORE_RESPONSE: (response: unknown) => ({response}),
RESET_KEY_INVALIDATE_ERROR_DISMISS: () => ({}),
RESET_LINKCODE: () => ({}),
BIOMETRIC_CANCELLED: () => ({}),
},
},
);
@@ -101,6 +102,9 @@ export const appMachine = model.createMachine(
actions: ['resetKeyInvalidateError'],
target: 'init',
},
BIOMETRIC_CANCELLED: {
target: 'init'
}
},
states: {
init: {
@@ -166,6 +170,10 @@ export const appMachine = model.createMachine(
],
target: 'info',
},
BIOMETRIC_CANCELLED: {
target: 'store'
}
},
},
info: {

View File

@@ -34,6 +34,7 @@ const model = createModel(
ONBOARDING_DONE: () => ({}),
INITIAL_DOWNLOAD_DONE: () => ({}),
SET_TOUR_GUIDE: (set: boolean) => ({set}),
BIOMETRIC_CANCELLED: () => ({}),
},
},
);
@@ -63,6 +64,9 @@ export const authMachine = model.createMachine(
SET_TOUR_GUIDE: {
actions: 'setTourGuide',
},
BIOMETRIC_CANCELLED: {
target: 'init'
},
},
states: {
init: {
@@ -76,6 +80,9 @@ export const authMachine = model.createMachine(
},
{target: 'savingDefaults'},
],
BIOMETRIC_CANCELLED: [{
target: 'init'
}],
},
},
savingDefaults: {

View File

@@ -1,190 +1,82 @@
// This file was automatically generated. Edits will be overwritten
export interface Typegen0 {
'@@xstate/typegen': true;
internalEvents: {
'done.invoke.backup.backingUp.checkInternet:invocation[0]': {
type: 'done.invoke.backup.backingUp.checkInternet:invocation[0]';
data: unknown;
__tip: 'See the XState TS docs to learn how to strongly type this.';
};
'done.invoke.backup.backingUp.checkStorageAvailability:invocation[0]': {
type: 'done.invoke.backup.backingUp.checkStorageAvailability:invocation[0]';
data: unknown;
__tip: 'See the XState TS docs to learn how to strongly type this.';
};
'done.invoke.backup.backingUp.uploadBackupFile:invocation[0]': {
type: 'done.invoke.backup.backingUp.uploadBackupFile:invocation[0]';
data: unknown;
__tip: 'See the XState TS docs to learn how to strongly type this.';
};
'done.invoke.backup.backingUp.zipBackupFile:invocation[0]': {
type: 'done.invoke.backup.backingUp.zipBackupFile:invocation[0]';
data: unknown;
__tip: 'See the XState TS docs to learn how to strongly type this.';
};
'done.invoke.backup.fetchLastBackupDetails.checkCloud:invocation[0]': {
type: 'done.invoke.backup.fetchLastBackupDetails.checkCloud:invocation[0]';
data: unknown;
__tip: 'See the XState TS docs to learn how to strongly type this.';
};
'error.platform.backup.backingUp.checkInternet:invocation[0]': {
type: 'error.platform.backup.backingUp.checkInternet:invocation[0]';
data: unknown;
};
'error.platform.backup.backingUp.checkStorageAvailability:invocation[0]': {
type: 'error.platform.backup.backingUp.checkStorageAvailability:invocation[0]';
data: unknown;
};
'error.platform.backup.backingUp.uploadBackupFile:invocation[0]': {
type: 'error.platform.backup.backingUp.uploadBackupFile:invocation[0]';
data: unknown;
};
'error.platform.backup.backingUp.zipBackupFile:invocation[0]': {
type: 'error.platform.backup.backingUp.zipBackupFile:invocation[0]';
data: unknown;
};
'error.platform.backup.fetchLastBackupDetails.checkCloud:invocation[0]': {
type: 'error.platform.backup.fetchLastBackupDetails.checkCloud:invocation[0]';
data: unknown;
};
'xstate.init': {type: 'xstate.init'};
};
invokeSrcNameMap: {
checkInternet: 'done.invoke.backup.backingUp.checkInternet:invocation[0]';
checkStorageAvailability: 'done.invoke.backup.backingUp.checkStorageAvailability:invocation[0]';
getLastBackupDetailsFromCloud: 'done.invoke.backup.fetchLastBackupDetails.checkCloud:invocation[0]';
uploadBackupFile: 'done.invoke.backup.backingUp.uploadBackupFile:invocation[0]';
writeDataToFile: 'done.invoke.backup.backingUp.writeDataToFile:invocation[0]';
zipBackupFile: 'done.invoke.backup.backingUp.zipBackupFile:invocation[0]';
};
missingImplementations: {
actions: never;
delays: never;
guards: never;
services: never;
};
eventsCausingActions: {
cleanupFiles:
| 'STORE_ERROR'
| 'STORE_RESPONSE'
| 'done.invoke.backup.backingUp.checkInternet:invocation[0]'
| 'done.invoke.backup.backingUp.checkStorageAvailability:invocation[0]'
| 'done.invoke.backup.backingUp.uploadBackupFile:invocation[0]'
| 'error.platform.backup.backingUp.checkInternet:invocation[0]'
| 'error.platform.backup.backingUp.checkStorageAvailability:invocation[0]'
| 'error.platform.backup.backingUp.uploadBackupFile:invocation[0]'
| 'error.platform.backup.backingUp.zipBackupFile:invocation[0]';
extractLastBackupDetails: 'done.invoke.backup.backingUp.uploadBackupFile:invocation[0]';
fetchAllDataFromDB: 'done.invoke.backup.backingUp.checkStorageAvailability:invocation[0]';
loadVcs: 'done.invoke.backup.backingUp.checkInternet:invocation[0]';
sendDataBackupFailureEvent:
| 'STORE_ERROR'
| 'STORE_RESPONSE'
| 'done.invoke.backup.backingUp.checkInternet:invocation[0]'
| 'done.invoke.backup.backingUp.checkStorageAvailability:invocation[0]'
| 'error.platform.backup.backingUp.checkInternet:invocation[0]'
| 'error.platform.backup.backingUp.checkStorageAvailability:invocation[0]'
| 'error.platform.backup.backingUp.uploadBackupFile:invocation[0]'
| 'error.platform.backup.backingUp.zipBackupFile:invocation[0]';
sendDataBackupStartEvent: 'DATA_BACKUP';
sendDataBackupSuccessEvent: 'done.invoke.backup.backingUp.uploadBackupFile:invocation[0]';
sendFetchLastBackupDetailsCancelEvent: 'DISMISS';
sendFetchLastBackupDetailsErrorEvent: 'error.platform.backup.fetchLastBackupDetails.checkCloud:invocation[0]';
sendFetchLastBackupDetailsFailureEvent: 'error.platform.backup.fetchLastBackupDetails.checkCloud:invocation[0]';
sendFetchLastBackupDetailsStartEvent: 'LAST_BACKUP_DETAILS' | 'TRY_AGAIN';
sendFetchLastBackupDetailsSuccessEvent: 'done.invoke.backup.fetchLastBackupDetails.checkCloud:invocation[0]';
setBackUpNotPossible:
| 'STORE_RESPONSE'
| 'error.platform.backup.backingUp.checkStorageAvailability:invocation[0]';
setBackupErrorReason:
| 'STORE_ERROR'
| 'error.platform.backup.backingUp.uploadBackupFile:invocation[0]';
setBackupErrorReasonAsNoInternet:
| 'done.invoke.backup.backingUp.checkInternet:invocation[0]'
| 'error.platform.backup.backingUp.checkInternet:invocation[0]';
setDataFromStorage: 'STORE_RESPONSE';
setErrorReasonAsStorageLimitReached: 'done.invoke.backup.backingUp.checkStorageAvailability:invocation[0]';
setFileName: 'FILE_NAME';
setIsAutoBackup: 'DATA_BACKUP';
setIsLoadingBackupDetails: 'LAST_BACKUP_DETAILS' | 'TRY_AGAIN';
setLastBackupDetails: 'done.invoke.backup.fetchLastBackupDetails.checkCloud:invocation[0]';
setShowBackupInProgress: 'DATA_BACKUP';
unsetIsLoadingBackupDetails:
| 'DISMISS'
| 'done.invoke.backup.fetchLastBackupDetails.checkCloud:invocation[0]'
| 'error.platform.backup.fetchLastBackupDetails.checkCloud:invocation[0]';
unsetLastBackupDetails: 'LAST_BACKUP_DETAILS' | 'TRY_AGAIN';
unsetShowBackupInProgress:
| 'DISMISS_SHOW_BACKUP_IN_PROGRESS'
| 'STORE_ERROR'
| 'STORE_RESPONSE'
| 'done.invoke.backup.backingUp.checkInternet:invocation[0]'
| 'done.invoke.backup.backingUp.checkStorageAvailability:invocation[0]'
| 'done.invoke.backup.backingUp.uploadBackupFile:invocation[0]'
| 'error.platform.backup.backingUp.checkInternet:invocation[0]'
| 'error.platform.backup.backingUp.checkStorageAvailability:invocation[0]'
| 'error.platform.backup.backingUp.uploadBackupFile:invocation[0]'
| 'error.platform.backup.backingUp.zipBackupFile:invocation[0]';
};
eventsCausingDelays: {};
eventsCausingGuards: {
checkIfAutoBackup:
| 'STORE_ERROR'
| 'STORE_RESPONSE'
| 'done.invoke.backup.backingUp.checkInternet:invocation[0]'
| 'done.invoke.backup.backingUp.checkStorageAvailability:invocation[0]'
| 'done.invoke.backup.backingUp.uploadBackupFile:invocation[0]'
| 'error.platform.backup.backingUp.checkInternet:invocation[0]'
| 'error.platform.backup.backingUp.checkStorageAvailability:invocation[0]'
| 'error.platform.backup.backingUp.uploadBackupFile:invocation[0]'
| 'error.platform.backup.backingUp.zipBackupFile:invocation[0]';
isInternetConnected: 'done.invoke.backup.backingUp.checkInternet:invocation[0]';
isMinimumStorageRequiredForBackupAvailable: 'done.invoke.backup.backingUp.checkStorageAvailability:invocation[0]';
isNetworkError: 'error.platform.backup.fetchLastBackupDetails.checkCloud:invocation[0]';
isVCFound: 'STORE_RESPONSE';
};
eventsCausingServices: {
checkInternet: 'DATA_BACKUP';
checkStorageAvailability: 'STORE_RESPONSE';
getLastBackupDetailsFromCloud: 'LAST_BACKUP_DETAILS' | 'TRY_AGAIN';
uploadBackupFile: 'done.invoke.backup.backingUp.zipBackupFile:invocation[0]';
writeDataToFile: 'STORE_RESPONSE';
zipBackupFile: 'FILE_NAME';
};
matchesStates:
| 'backingUp'
| 'backingUp.checkDataAvailabilityForBackup'
| 'backingUp.checkInternet'
| 'backingUp.checkStorageAvailability'
| 'backingUp.failure'
| 'backingUp.fetchDataFromDB'
| 'backingUp.idle'
| 'backingUp.silentFailure'
| 'backingUp.silentSuccess'
| 'backingUp.success'
| 'backingUp.uploadBackupFile'
| 'backingUp.writeDataToFile'
| 'backingUp.zipBackupFile'
| 'fetchLastBackupDetails'
| 'fetchLastBackupDetails.checkCloud'
| 'fetchLastBackupDetails.idle'
| 'fetchLastBackupDetails.noInternet'
| {
backingUp?:
| 'checkDataAvailabilityForBackup'
| 'checkInternet'
| 'checkStorageAvailability'
| 'failure'
| 'fetchDataFromDB'
| 'idle'
| 'silentFailure'
| 'silentSuccess'
| 'success'
| 'uploadBackupFile'
| 'writeDataToFile'
| 'zipBackupFile';
fetchLastBackupDetails?: 'checkCloud' | 'idle' | 'noInternet';
};
tags: never;
}
// This file was automatically generated. Edits will be overwritten
export interface Typegen0 {
'@@xstate/typegen': true;
internalEvents: {
"done.invoke.backup.backingUp.checkInternet:invocation[0]": { type: "done.invoke.backup.backingUp.checkInternet:invocation[0]"; data: unknown; __tip: "See the XState TS docs to learn how to strongly type this." };
"done.invoke.backup.backingUp.checkStorageAvailability:invocation[0]": { type: "done.invoke.backup.backingUp.checkStorageAvailability:invocation[0]"; data: unknown; __tip: "See the XState TS docs to learn how to strongly type this." };
"done.invoke.backup.backingUp.uploadBackupFile:invocation[0]": { type: "done.invoke.backup.backingUp.uploadBackupFile:invocation[0]"; data: unknown; __tip: "See the XState TS docs to learn how to strongly type this." };
"done.invoke.backup.backingUp.zipBackupFile:invocation[0]": { type: "done.invoke.backup.backingUp.zipBackupFile:invocation[0]"; data: unknown; __tip: "See the XState TS docs to learn how to strongly type this." };
"done.invoke.backup.fetchLastBackupDetails.checkCloud:invocation[0]": { type: "done.invoke.backup.fetchLastBackupDetails.checkCloud:invocation[0]"; data: unknown; __tip: "See the XState TS docs to learn how to strongly type this." };
"error.platform.backup.backingUp.checkInternet:invocation[0]": { type: "error.platform.backup.backingUp.checkInternet:invocation[0]"; data: unknown };
"error.platform.backup.backingUp.checkStorageAvailability:invocation[0]": { type: "error.platform.backup.backingUp.checkStorageAvailability:invocation[0]"; data: unknown };
"error.platform.backup.backingUp.uploadBackupFile:invocation[0]": { type: "error.platform.backup.backingUp.uploadBackupFile:invocation[0]"; data: unknown };
"error.platform.backup.backingUp.zipBackupFile:invocation[0]": { type: "error.platform.backup.backingUp.zipBackupFile:invocation[0]"; data: unknown };
"error.platform.backup.fetchLastBackupDetails.checkCloud:invocation[0]": { type: "error.platform.backup.fetchLastBackupDetails.checkCloud:invocation[0]"; data: unknown };
"xstate.init": { type: "xstate.init" };
};
invokeSrcNameMap: {
"checkInternet": "done.invoke.backup.backingUp.checkInternet:invocation[0]";
"checkStorageAvailability": "done.invoke.backup.backingUp.checkStorageAvailability:invocation[0]";
"getLastBackupDetailsFromCloud": "done.invoke.backup.fetchLastBackupDetails.checkCloud:invocation[0]";
"uploadBackupFile": "done.invoke.backup.backingUp.uploadBackupFile:invocation[0]";
"writeDataToFile": "done.invoke.backup.backingUp.writeDataToFile:invocation[0]";
"zipBackupFile": "done.invoke.backup.backingUp.zipBackupFile:invocation[0]";
};
missingImplementations: {
actions: never;
delays: never;
guards: never;
services: never;
};
eventsCausingActions: {
"cleanupFiles": "STORE_ERROR" | "STORE_RESPONSE" | "done.invoke.backup.backingUp.checkInternet:invocation[0]" | "done.invoke.backup.backingUp.checkStorageAvailability:invocation[0]" | "done.invoke.backup.backingUp.uploadBackupFile:invocation[0]" | "error.platform.backup.backingUp.checkInternet:invocation[0]" | "error.platform.backup.backingUp.checkStorageAvailability:invocation[0]" | "error.platform.backup.backingUp.uploadBackupFile:invocation[0]" | "error.platform.backup.backingUp.zipBackupFile:invocation[0]";
"extractLastBackupDetails": "done.invoke.backup.backingUp.uploadBackupFile:invocation[0]";
"fetchAllDataFromDB": "done.invoke.backup.backingUp.checkStorageAvailability:invocation[0]";
"loadVcs": "done.invoke.backup.backingUp.checkInternet:invocation[0]";
"sendDataBackupFailureEvent": "STORE_ERROR" | "STORE_RESPONSE" | "done.invoke.backup.backingUp.checkInternet:invocation[0]" | "done.invoke.backup.backingUp.checkStorageAvailability:invocation[0]" | "error.platform.backup.backingUp.checkInternet:invocation[0]" | "error.platform.backup.backingUp.checkStorageAvailability:invocation[0]" | "error.platform.backup.backingUp.uploadBackupFile:invocation[0]" | "error.platform.backup.backingUp.zipBackupFile:invocation[0]";
"sendDataBackupStartEvent": "DATA_BACKUP";
"sendDataBackupSuccessEvent": "done.invoke.backup.backingUp.uploadBackupFile:invocation[0]";
"sendFetchLastBackupDetailsCancelEvent": "DISMISS";
"sendFetchLastBackupDetailsErrorEvent": "error.platform.backup.fetchLastBackupDetails.checkCloud:invocation[0]";
"sendFetchLastBackupDetailsFailureEvent": "error.platform.backup.fetchLastBackupDetails.checkCloud:invocation[0]";
"sendFetchLastBackupDetailsStartEvent": "LAST_BACKUP_DETAILS" | "TRY_AGAIN";
"sendFetchLastBackupDetailsSuccessEvent": "done.invoke.backup.fetchLastBackupDetails.checkCloud:invocation[0]";
"setBackUpNotPossible": "STORE_RESPONSE" | "error.platform.backup.backingUp.checkStorageAvailability:invocation[0]";
"setBackupErrorReason": "STORE_ERROR" | "error.platform.backup.backingUp.uploadBackupFile:invocation[0]";
"setBackupErrorReasonAsNoInternet": "done.invoke.backup.backingUp.checkInternet:invocation[0]" | "error.platform.backup.backingUp.checkInternet:invocation[0]";
"setDataFromStorage": "STORE_RESPONSE";
"setErrorReasonAsStorageLimitReached": "done.invoke.backup.backingUp.checkStorageAvailability:invocation[0]";
"setFileName": "FILE_NAME";
"setIsAutoBackup": "DATA_BACKUP";
"setIsLoadingBackupDetails": "LAST_BACKUP_DETAILS" | "TRY_AGAIN";
"setLastBackupDetails": "done.invoke.backup.fetchLastBackupDetails.checkCloud:invocation[0]";
"setShowBackupInProgress": "DATA_BACKUP";
"unsetIsLoadingBackupDetails": "DISMISS" | "done.invoke.backup.fetchLastBackupDetails.checkCloud:invocation[0]" | "error.platform.backup.fetchLastBackupDetails.checkCloud:invocation[0]";
"unsetLastBackupDetails": "LAST_BACKUP_DETAILS" | "TRY_AGAIN";
"unsetShowBackupInProgress": "DISMISS_SHOW_BACKUP_IN_PROGRESS" | "STORE_ERROR" | "STORE_RESPONSE" | "done.invoke.backup.backingUp.checkInternet:invocation[0]" | "done.invoke.backup.backingUp.checkStorageAvailability:invocation[0]" | "done.invoke.backup.backingUp.uploadBackupFile:invocation[0]" | "error.platform.backup.backingUp.checkInternet:invocation[0]" | "error.platform.backup.backingUp.checkStorageAvailability:invocation[0]" | "error.platform.backup.backingUp.uploadBackupFile:invocation[0]" | "error.platform.backup.backingUp.zipBackupFile:invocation[0]";
};
eventsCausingDelays: {
};
eventsCausingGuards: {
"checkIfAutoBackup": "STORE_ERROR" | "STORE_RESPONSE" | "done.invoke.backup.backingUp.checkInternet:invocation[0]" | "done.invoke.backup.backingUp.checkStorageAvailability:invocation[0]" | "done.invoke.backup.backingUp.uploadBackupFile:invocation[0]" | "error.platform.backup.backingUp.checkInternet:invocation[0]" | "error.platform.backup.backingUp.checkStorageAvailability:invocation[0]" | "error.platform.backup.backingUp.uploadBackupFile:invocation[0]" | "error.platform.backup.backingUp.zipBackupFile:invocation[0]";
"isInternetConnected": "done.invoke.backup.backingUp.checkInternet:invocation[0]";
"isMinimumStorageRequiredForBackupAvailable": "done.invoke.backup.backingUp.checkStorageAvailability:invocation[0]";
"isNetworkError": "error.platform.backup.fetchLastBackupDetails.checkCloud:invocation[0]";
"isVCFound": "STORE_RESPONSE";
};
eventsCausingServices: {
"checkInternet": "DATA_BACKUP";
"checkStorageAvailability": "STORE_RESPONSE";
"getLastBackupDetailsFromCloud": "LAST_BACKUP_DETAILS" | "TRY_AGAIN";
"uploadBackupFile": "done.invoke.backup.backingUp.zipBackupFile:invocation[0]";
"writeDataToFile": "STORE_RESPONSE";
"zipBackupFile": "FILE_NAME";
};
matchesStates: "backingUp" | "backingUp.checkDataAvailabilityForBackup" | "backingUp.checkInternet" | "backingUp.checkStorageAvailability" | "backingUp.failure" | "backingUp.fetchDataFromDB" | "backingUp.idle" | "backingUp.silentFailure" | "backingUp.silentSuccess" | "backingUp.success" | "backingUp.uploadBackupFile" | "backingUp.writeDataToFile" | "backingUp.zipBackupFile" | "fetchLastBackupDetails" | "fetchLastBackupDetails.checkCloud" | "fetchLastBackupDetails.idle" | "fetchLastBackupDetails.noInternet" | { "backingUp"?: "checkDataAvailabilityForBackup" | "checkInternet" | "checkStorageAvailability" | "failure" | "fetchDataFromDB" | "idle" | "silentFailure" | "silentSuccess" | "success" | "uploadBackupFile" | "writeDataToFile" | "zipBackupFile";
"fetchLastBackupDetails"?: "checkCloud" | "idle" | "noInternet"; };
tags: never;
}

View File

@@ -0,0 +1,60 @@
// This file was automatically generated. Edits will be overwritten
export interface Typegen0 {
'@@xstate/typegen': true;
internalEvents: {
"done.invoke.backupAndRestoreSetup.checkSignIn:invocation[0]": { type: "done.invoke.backupAndRestoreSetup.checkSignIn:invocation[0]"; data: unknown; __tip: "See the XState TS docs to learn how to strongly type this." };
"done.invoke.backupAndRestoreSetup.init.checkInternet:invocation[0]": { type: "done.invoke.backupAndRestoreSetup.init.checkInternet:invocation[0]"; data: unknown; __tip: "See the XState TS docs to learn how to strongly type this." };
"done.invoke.signIn:invocation[0]": { type: "done.invoke.signIn:invocation[0]"; data: unknown; __tip: "See the XState TS docs to learn how to strongly type this." };
"error.platform.backupAndRestoreSetup.init.checkInternet:invocation[0]": { type: "error.platform.backupAndRestoreSetup.init.checkInternet:invocation[0]"; data: unknown };
"xstate.init": { type: "xstate.init" };
};
invokeSrcNameMap: {
"checkInternet": "done.invoke.backupAndRestoreSetup.init.checkInternet:invocation[0]";
"isUserSignedAlready": "done.invoke.backupAndRestoreSetup.checkSignIn:invocation[0]";
"signIn": "done.invoke.signIn:invocation[0]";
};
missingImplementations: {
actions: never;
delays: never;
guards: never;
services: never;
};
eventsCausingActions: {
"fetchShowConfirmationInfo": "done.invoke.backupAndRestoreSetup.init.checkInternet:invocation[0]";
"openSettings": "OPEN_SETTINGS";
"sendBackupAndRestoreSetupCancelEvent": "DISMISS" | "GO_BACK";
"sendBackupAndRestoreSetupErrorEvent": "done.invoke.backupAndRestoreSetup.checkSignIn:invocation[0]" | "done.invoke.backupAndRestoreSetup.init.checkInternet:invocation[0]" | "done.invoke.signIn:invocation[0]" | "error.platform.backupAndRestoreSetup.init.checkInternet:invocation[0]";
"sendBackupAndRestoreSetupSuccessEvent": "done.invoke.backupAndRestoreSetup.checkSignIn:invocation[0]" | "done.invoke.signIn:invocation[0]";
"sendDataBackupAndRestoreSetupStartEvent": "HANDLE_BACKUP_AND_RESTORE";
"setAccountSelectionConfirmationShown": "done.invoke.backupAndRestoreSetup.checkSignIn:invocation[0]" | "done.invoke.signIn:invocation[0]";
"setIsLoading": "HANDLE_BACKUP_AND_RESTORE" | "PROCEED" | "TRY_AGAIN";
"setProfileInfo": "done.invoke.backupAndRestoreSetup.checkSignIn:invocation[0]" | "done.invoke.signIn:invocation[0]";
"setShouldTriggerAutoBackup": "done.invoke.signIn:invocation[0]";
"unsetIsLoading": "DISMISS" | "STORE_RESPONSE" | "done.invoke.backupAndRestoreSetup.checkSignIn:invocation[0]" | "done.invoke.backupAndRestoreSetup.init.checkInternet:invocation[0]" | "error.platform.backupAndRestoreSetup.init.checkInternet:invocation[0]";
"unsetShouldTriggerAutoBackup": "HANDLE_BACKUP_AND_RESTORE";
};
eventsCausingDelays: {
};
eventsCausingGuards: {
"isAuthorisedAndCloudAccessNotGiven": "done.invoke.backupAndRestoreSetup.checkSignIn:invocation[0]";
"isConfirmationAlreadyShown": "STORE_RESPONSE";
"isIOSAndSignInFailed": "done.invoke.signIn:invocation[0]";
"isInternetConnected": "done.invoke.backupAndRestoreSetup.init.checkInternet:invocation[0]";
"isNetworkError": "done.invoke.backupAndRestoreSetup.checkSignIn:invocation[0]" | "done.invoke.signIn:invocation[0]";
"isSignInSuccessful": "done.invoke.signIn:invocation[0]";
"isSignedIn": "done.invoke.backupAndRestoreSetup.checkSignIn:invocation[0]";
};
eventsCausingServices: {
"checkInternet": "HANDLE_BACKUP_AND_RESTORE" | "TRY_AGAIN";
"isUserSignedAlready": "PROCEED" | "STORE_RESPONSE";
"signIn": "done.invoke.backupAndRestoreSetup.checkSignIn:invocation[0]";
};
matchesStates: "backupAndRestore" | "checkSignIn" | "checkSignIn.error" | "checkSignIn.idle" | "checkSignIn.noInternet" | "fetchShowConfirmationInfo" | "init" | "init.checkInternet" | "init.idle" | "init.noInternet" | "selectCloudAccount" | "signIn" | "signIn.error" | "signIn.idle" | "signIn.noInternet" | { "checkSignIn"?: "error" | "idle" | "noInternet";
"init"?: "checkInternet" | "idle" | "noInternet";
"signIn"?: "error" | "idle" | "noInternet"; };
tags: never;
}

View File

@@ -1,134 +1,63 @@
// This file was automatically generated. Edits will be overwritten
export interface Typegen0 {
'@@xstate/typegen': true;
internalEvents: {
'done.invoke.backupRestore.restoreBackup.checkInternet:invocation[0]': {
type: 'done.invoke.backupRestore.restoreBackup.checkInternet:invocation[0]';
data: unknown;
__tip: 'See the XState TS docs to learn how to strongly type this.';
};
'done.invoke.backupRestore.restoreBackup.checkStorageAvailability:invocation[0]': {
type: 'done.invoke.backupRestore.restoreBackup.checkStorageAvailability:invocation[0]';
data: unknown;
__tip: 'See the XState TS docs to learn how to strongly type this.';
};
'done.invoke.backupRestore.restoreBackup.downloadBackupFileFromCloud:invocation[0]': {
type: 'done.invoke.backupRestore.restoreBackup.downloadBackupFileFromCloud:invocation[0]';
data: unknown;
__tip: 'See the XState TS docs to learn how to strongly type this.';
};
'done.invoke.backupRestore.restoreBackup.unzipBackupFile:invocation[0]': {
type: 'done.invoke.backupRestore.restoreBackup.unzipBackupFile:invocation[0]';
data: unknown;
__tip: 'See the XState TS docs to learn how to strongly type this.';
};
'error.platform.backupRestore.restoreBackup.checkInternet:invocation[0]': {
type: 'error.platform.backupRestore.restoreBackup.checkInternet:invocation[0]';
data: unknown;
};
'error.platform.backupRestore.restoreBackup.downloadBackupFileFromCloud:invocation[0]': {
type: 'error.platform.backupRestore.restoreBackup.downloadBackupFileFromCloud:invocation[0]';
data: unknown;
};
'error.platform.backupRestore.restoreBackup.unzipBackupFile:invocation[0]': {
type: 'error.platform.backupRestore.restoreBackup.unzipBackupFile:invocation[0]';
data: unknown;
};
'xstate.init': {type: 'xstate.init'};
};
invokeSrcNameMap: {
checkInternet: 'done.invoke.backupRestore.restoreBackup.checkInternet:invocation[0]';
checkStorageAvailability: 'done.invoke.backupRestore.restoreBackup.checkStorageAvailability:invocation[0]';
downloadLatestBackup: 'done.invoke.backupRestore.restoreBackup.downloadBackupFileFromCloud:invocation[0]';
readBackupFile: 'done.invoke.backupRestore.restoreBackup.readBackupFile:invocation[0]';
unzipBackupFile: 'done.invoke.backupRestore.restoreBackup.unzipBackupFile:invocation[0]';
};
missingImplementations: {
actions: never;
delays: never;
guards: never;
services: never;
};
eventsCausingActions: {
cleanupFiles:
| 'STORE_ERROR'
| 'STORE_RESPONSE'
| 'done.invoke.backupRestore.restoreBackup.checkInternet:invocation[0]'
| 'done.invoke.backupRestore.restoreBackup.checkStorageAvailability:invocation[0]'
| 'error.platform.backupRestore.restoreBackup.checkInternet:invocation[0]'
| 'error.platform.backupRestore.restoreBackup.downloadBackupFileFromCloud:invocation[0]'
| 'error.platform.backupRestore.restoreBackup.unzipBackupFile:invocation[0]';
downloadUnsyncedBackupFiles: 'DOWNLOAD_UNSYNCED_BACKUP_FILES';
loadDataToMemory: 'DATA_FROM_FILE';
refreshVCs: 'STORE_RESPONSE';
sendDataRestoreErrorEvent:
| 'done.invoke.backupRestore.restoreBackup.checkInternet:invocation[0]'
| 'error.platform.backupRestore.restoreBackup.checkInternet:invocation[0]';
sendDataRestoreFailureEvent:
| 'STORE_ERROR'
| 'done.invoke.backupRestore.restoreBackup.checkInternet:invocation[0]'
| 'done.invoke.backupRestore.restoreBackup.checkStorageAvailability:invocation[0]'
| 'error.platform.backupRestore.restoreBackup.checkInternet:invocation[0]'
| 'error.platform.backupRestore.restoreBackup.downloadBackupFileFromCloud:invocation[0]'
| 'error.platform.backupRestore.restoreBackup.unzipBackupFile:invocation[0]';
sendDataRestoreStartEvent: 'BACKUP_RESTORE';
sendDataRestoreSuccessEvent: 'STORE_RESPONSE';
setBackupFileName: 'done.invoke.backupRestore.restoreBackup.downloadBackupFileFromCloud:invocation[0]';
setDataFromBackupFile: 'DATA_FROM_FILE';
setRestoreErrorReason:
| 'error.platform.backupRestore.restoreBackup.downloadBackupFileFromCloud:invocation[0]'
| 'error.platform.backupRestore.restoreBackup.unzipBackupFile:invocation[0]';
setRestoreErrorReasonAsNetworkError:
| 'done.invoke.backupRestore.restoreBackup.checkInternet:invocation[0]'
| 'error.platform.backupRestore.restoreBackup.checkInternet:invocation[0]';
setRestoreTechnicalError:
| 'STORE_ERROR'
| 'done.invoke.backupRestore.restoreBackup.checkStorageAvailability:invocation[0]';
setShowRestoreInProgress: 'BACKUP_RESTORE';
unsetShowRestoreInProgress:
| 'DISMISS_SHOW_RESTORE_IN_PROGRESS'
| 'STORE_ERROR'
| 'STORE_RESPONSE'
| 'done.invoke.backupRestore.restoreBackup.checkInternet:invocation[0]'
| 'done.invoke.backupRestore.restoreBackup.checkStorageAvailability:invocation[0]'
| 'error.platform.backupRestore.restoreBackup.checkInternet:invocation[0]'
| 'error.platform.backupRestore.restoreBackup.downloadBackupFileFromCloud:invocation[0]'
| 'error.platform.backupRestore.restoreBackup.unzipBackupFile:invocation[0]';
};
eventsCausingDelays: {};
eventsCausingGuards: {
isInternetConnected: 'done.invoke.backupRestore.restoreBackup.checkInternet:invocation[0]';
isMinimumStorageRequiredForBackupRestorationReached: 'done.invoke.backupRestore.restoreBackup.checkStorageAvailability:invocation[0]';
};
eventsCausingServices: {
checkInternet: 'BACKUP_RESTORE';
checkStorageAvailability: 'done.invoke.backupRestore.restoreBackup.checkInternet:invocation[0]';
downloadLatestBackup: 'done.invoke.backupRestore.restoreBackup.checkStorageAvailability:invocation[0]';
readBackupFile: 'done.invoke.backupRestore.restoreBackup.unzipBackupFile:invocation[0]';
unzipBackupFile: 'done.invoke.backupRestore.restoreBackup.downloadBackupFileFromCloud:invocation[0]';
};
matchesStates:
| 'init'
| 'restoreBackup'
| 'restoreBackup.checkInternet'
| 'restoreBackup.checkStorageAvailability'
| 'restoreBackup.downloadBackupFileFromCloud'
| 'restoreBackup.failure'
| 'restoreBackup.loadDataToMemory'
| 'restoreBackup.readBackupFile'
| 'restoreBackup.success'
| 'restoreBackup.unzipBackupFile'
| {
restoreBackup?:
| 'checkInternet'
| 'checkStorageAvailability'
| 'downloadBackupFileFromCloud'
| 'failure'
| 'loadDataToMemory'
| 'readBackupFile'
| 'success'
| 'unzipBackupFile';
};
tags: never;
}
// This file was automatically generated. Edits will be overwritten
export interface Typegen0 {
'@@xstate/typegen': true;
internalEvents: {
"done.invoke.backupRestore.restoreBackup.checkInternet:invocation[0]": { type: "done.invoke.backupRestore.restoreBackup.checkInternet:invocation[0]"; data: unknown; __tip: "See the XState TS docs to learn how to strongly type this." };
"done.invoke.backupRestore.restoreBackup.checkStorageAvailability:invocation[0]": { type: "done.invoke.backupRestore.restoreBackup.checkStorageAvailability:invocation[0]"; data: unknown; __tip: "See the XState TS docs to learn how to strongly type this." };
"done.invoke.backupRestore.restoreBackup.downloadBackupFileFromCloud:invocation[0]": { type: "done.invoke.backupRestore.restoreBackup.downloadBackupFileFromCloud:invocation[0]"; data: unknown; __tip: "See the XState TS docs to learn how to strongly type this." };
"done.invoke.backupRestore.restoreBackup.unzipBackupFile:invocation[0]": { type: "done.invoke.backupRestore.restoreBackup.unzipBackupFile:invocation[0]"; data: unknown; __tip: "See the XState TS docs to learn how to strongly type this." };
"error.platform.backupRestore.restoreBackup.checkInternet:invocation[0]": { type: "error.platform.backupRestore.restoreBackup.checkInternet:invocation[0]"; data: unknown };
"error.platform.backupRestore.restoreBackup.downloadBackupFileFromCloud:invocation[0]": { type: "error.platform.backupRestore.restoreBackup.downloadBackupFileFromCloud:invocation[0]"; data: unknown };
"error.platform.backupRestore.restoreBackup.unzipBackupFile:invocation[0]": { type: "error.platform.backupRestore.restoreBackup.unzipBackupFile:invocation[0]"; data: unknown };
"xstate.init": { type: "xstate.init" };
};
invokeSrcNameMap: {
"checkInternet": "done.invoke.backupRestore.restoreBackup.checkInternet:invocation[0]";
"checkStorageAvailability": "done.invoke.backupRestore.restoreBackup.checkStorageAvailability:invocation[0]";
"downloadLatestBackup": "done.invoke.backupRestore.restoreBackup.downloadBackupFileFromCloud:invocation[0]";
"readBackupFile": "done.invoke.backupRestore.restoreBackup.readBackupFile:invocation[0]";
"unzipBackupFile": "done.invoke.backupRestore.restoreBackup.unzipBackupFile:invocation[0]";
};
missingImplementations: {
actions: never;
delays: never;
guards: never;
services: never;
};
eventsCausingActions: {
"cleanupFiles": "STORE_ERROR" | "STORE_RESPONSE" | "done.invoke.backupRestore.restoreBackup.checkInternet:invocation[0]" | "done.invoke.backupRestore.restoreBackup.checkStorageAvailability:invocation[0]" | "error.platform.backupRestore.restoreBackup.checkInternet:invocation[0]" | "error.platform.backupRestore.restoreBackup.downloadBackupFileFromCloud:invocation[0]" | "error.platform.backupRestore.restoreBackup.unzipBackupFile:invocation[0]";
"downloadUnsyncedBackupFiles": "DOWNLOAD_UNSYNCED_BACKUP_FILES";
"loadDataToMemory": "DATA_FROM_FILE";
"refreshVCs": "STORE_RESPONSE";
"sendDataRestoreErrorEvent": "done.invoke.backupRestore.restoreBackup.checkInternet:invocation[0]" | "error.platform.backupRestore.restoreBackup.checkInternet:invocation[0]";
"sendDataRestoreFailureEvent": "STORE_ERROR" | "done.invoke.backupRestore.restoreBackup.checkInternet:invocation[0]" | "done.invoke.backupRestore.restoreBackup.checkStorageAvailability:invocation[0]" | "error.platform.backupRestore.restoreBackup.checkInternet:invocation[0]" | "error.platform.backupRestore.restoreBackup.downloadBackupFileFromCloud:invocation[0]" | "error.platform.backupRestore.restoreBackup.unzipBackupFile:invocation[0]";
"sendDataRestoreStartEvent": "BACKUP_RESTORE";
"sendDataRestoreSuccessEvent": "STORE_RESPONSE";
"setBackupFileName": "done.invoke.backupRestore.restoreBackup.downloadBackupFileFromCloud:invocation[0]";
"setDataFromBackupFile": "DATA_FROM_FILE";
"setRestoreErrorReason": "error.platform.backupRestore.restoreBackup.downloadBackupFileFromCloud:invocation[0]" | "error.platform.backupRestore.restoreBackup.unzipBackupFile:invocation[0]";
"setRestoreErrorReasonAsNetworkError": "done.invoke.backupRestore.restoreBackup.checkInternet:invocation[0]" | "error.platform.backupRestore.restoreBackup.checkInternet:invocation[0]";
"setRestoreTechnicalError": "STORE_ERROR" | "done.invoke.backupRestore.restoreBackup.checkStorageAvailability:invocation[0]";
"setShowRestoreInProgress": "BACKUP_RESTORE";
"unsetShowRestoreInProgress": "DISMISS_SHOW_RESTORE_IN_PROGRESS" | "STORE_ERROR" | "STORE_RESPONSE" | "done.invoke.backupRestore.restoreBackup.checkInternet:invocation[0]" | "done.invoke.backupRestore.restoreBackup.checkStorageAvailability:invocation[0]" | "error.platform.backupRestore.restoreBackup.checkInternet:invocation[0]" | "error.platform.backupRestore.restoreBackup.downloadBackupFileFromCloud:invocation[0]" | "error.platform.backupRestore.restoreBackup.unzipBackupFile:invocation[0]";
};
eventsCausingDelays: {
};
eventsCausingGuards: {
"isInternetConnected": "done.invoke.backupRestore.restoreBackup.checkInternet:invocation[0]";
"isMinimumStorageRequiredForBackupRestorationReached": "done.invoke.backupRestore.restoreBackup.checkStorageAvailability:invocation[0]";
};
eventsCausingServices: {
"checkInternet": "BACKUP_RESTORE";
"checkStorageAvailability": "done.invoke.backupRestore.restoreBackup.checkInternet:invocation[0]";
"downloadLatestBackup": "done.invoke.backupRestore.restoreBackup.checkStorageAvailability:invocation[0]";
"readBackupFile": "done.invoke.backupRestore.restoreBackup.unzipBackupFile:invocation[0]";
"unzipBackupFile": "done.invoke.backupRestore.restoreBackup.downloadBackupFileFromCloud:invocation[0]";
};
matchesStates: "init" | "restoreBackup" | "restoreBackup.checkInternet" | "restoreBackup.checkStorageAvailability" | "restoreBackup.downloadBackupFileFromCloud" | "restoreBackup.failure" | "restoreBackup.loadDataToMemory" | "restoreBackup.readBackupFile" | "restoreBackup.success" | "restoreBackup.unzipBackupFile" | { "restoreBackup"?: "checkInternet" | "checkStorageAvailability" | "downloadBackupFileFromCloud" | "failure" | "loadDataToMemory" | "readBackupFile" | "success" | "unzipBackupFile"; };
tags: never;
}

View File

@@ -620,7 +620,6 @@ export const requestMachine =
VCActivityLog.getLogFromObject({
_vcKey: vcMetadata.getVcKey(),
type: context.receiveLogType,
id: vcMetadata.displayId,
credentialConfigurationId:
context.incomingVc.verifiableCredential
.credentialConfigurationId,

View File

@@ -242,7 +242,6 @@ export const ScanActions = (model: any) => {
type: context.shareLogType
? context.shareLogType
: 'VC_SHARED_WITH_VERIFICATION_CONSENT',
id: vcMetadata.displayId,
credentialConfigurationId:
context.selectedVc.verifiableCredential.credentialConfigurationId,
issuer: vcMetadata.issuer!!,
@@ -265,7 +264,6 @@ export const ScanActions = (model: any) => {
timestamp: Date.now(),
credentialConfigurationId:
context.selectedVc.verifiableCredential.credentialConfigurationId,
id: vcMetadata.displayId,
issuer: vcMetadata.issuer!!,
deviceName:
context.receiverInfo.name || context.receiverInfo.deviceName,
@@ -340,7 +338,6 @@ export const ScanActions = (model: any) => {
return ActivityLogEvents.LOG_ACTIVITY(
VCActivityLog.getLogFromObject({
_vcKey: '',
id: vcMetadata.displayId,
issuer: vcMetadata.issuer!!,
credentialConfigurationId:
selectedVc.verifiableCredential.credentialConfigurationId,

View File

@@ -1,4 +1,4 @@
import {assign, ContextFrom, EventFrom, send, StateFrom} from 'xstate';
import {assign, ContextFrom, EventFrom, send, StateFrom, sendUpdate} from 'xstate';
import {createModel} from 'xstate/lib/model';
import {AppServices} from '../shared/GlobalContext';
import {
@@ -31,7 +31,6 @@ const model = createModel(
esignetHostUrl: ESIGNET_BASE_URL,
appId: null,
isBackupAndRestoreExplored: false as boolean,
isKeyManagementExplored: false as boolean,
isKeyManagementTourGuideExplored: false as boolean,
isKeyOrderSet: undefined as unknown as boolean,
hasUserShownWithHardwareKeystoreNotExists: false,
@@ -72,6 +71,7 @@ const model = createModel(
RESET_KEY_ORDER_RESPONSE: () => ({}),
SHOWN_ACCOUNT_SELECTION_CONFIRMATION: () => ({}),
DISMISS: () => ({}),
BIOMETRIC_CANCELLED: (requester?: string) => ({requester}),
},
},
);
@@ -106,6 +106,18 @@ export const settingsMachine = model.createMachine(
},
{target: 'storingDefaults'},
],
BIOMETRIC_CANCELLED: {
actions: [
send(
(_, event) => model.events.BIOMETRIC_CANCELLED(event.requester),
{
to: (_, event) => event.requester,
},
),
sendUpdate(),
],
target: 'init',
},
},
},
storingDefaults: {
@@ -267,9 +279,6 @@ export const settingsMachine = model.createMachine(
setBackupAndRestoreOptionExplored: model.assign({
isBackupAndRestoreExplored: () => true,
}),
setKeyManagementExplored: model.assign({
isKeyManagementExplored: true,
}),
setKeyOrderingResponse: model.assign({
isKeyOrderSet: (_, event: any) => event.status,
}),
@@ -370,9 +379,6 @@ export function selectAppId(state: State) {
return state?.context?.appId;
}
export function selectIsKeymanagementExplored(state: State) {
return state.context.isKeyManagementExplored == true;
}
/** Alerting the user when the hardware keystore not supported by device and
* not shown to user atlease once */

View File

@@ -1,70 +1,57 @@
// This file was automatically generated. Edits will be overwritten
export interface Typegen0 {
'@@xstate/typegen': true;
internalEvents: {
'done.invoke.settings.resetInjiProps:invocation[0]': {
type: 'done.invoke.settings.resetInjiProps:invocation[0]';
data: unknown;
__tip: 'See the XState TS docs to learn how to strongly type this.';
};
'error.platform.settings.resetInjiProps:invocation[0]': {
type: 'error.platform.settings.resetInjiProps:invocation[0]';
data: unknown;
};
'xstate.init': {type: 'xstate.init'};
};
invokeSrcNameMap: {
resetInjiProps: 'done.invoke.settings.resetInjiProps:invocation[0]';
};
missingImplementations: {
actions: never;
delays: never;
guards: never;
services: never;
};
eventsCausingActions: {
requestStoredContext: 'xstate.init';
resetCredentialRegistryResponse: 'CANCEL' | 'UPDATE_HOST';
resetIsBiometricToggled: 'DISMISS';
setBackupAndRestoreOptionExplored: 'SET_IS_BACKUP_AND_RESTORE_EXPLORED';
setContext: 'STORE_RESPONSE';
setIsBiometricToggled: 'TOGGLE_BIOMETRIC_UNLOCK';
storeContext:
| 'ACCEPT_HARDWARE_SUPPORT_NOT_EXISTS'
| 'SET_IS_BACKUP_AND_RESTORE_EXPLORED'
| 'SHOWN_ACCOUNT_SELECTION_CONFIRMATION'
| 'STORE_RESPONSE'
| 'TOGGLE_BIOMETRIC_UNLOCK'
| 'UPDATE_HOST'
| 'UPDATE_NAME'
| 'UPDATE_VC_LABEL'
| 'done.invoke.settings.resetInjiProps:invocation[0]';
toggleBiometricUnlock: 'TOGGLE_BIOMETRIC_UNLOCK';
updateCredentialRegistry: 'done.invoke.settings.resetInjiProps:invocation[0]';
updateCredentialRegistryResponse: 'error.platform.settings.resetInjiProps:invocation[0]';
updateCredentialRegistrySuccess: 'done.invoke.settings.resetInjiProps:invocation[0]';
updateDefaults: 'STORE_RESPONSE';
updateEsignetHostUrl: 'UPDATE_HOST';
updateIsAccountSelectionConfirmationShown: 'SHOWN_ACCOUNT_SELECTION_CONFIRMATION';
updateName: 'UPDATE_NAME';
updatePartialDefaults: 'STORE_RESPONSE';
updateUserShownWithHardwareKeystoreNotExists: 'ACCEPT_HARDWARE_SUPPORT_NOT_EXISTS';
updateVcLabel: 'UPDATE_VC_LABEL';
};
eventsCausingDelays: {};
eventsCausingGuards: {
hasData: 'STORE_RESPONSE';
hasPartialData: 'STORE_RESPONSE';
};
eventsCausingServices: {
resetInjiProps: 'UPDATE_HOST';
};
matchesStates:
| 'idle'
| 'init'
| 'resetInjiProps'
| 'showInjiTourGuide'
| 'storingDefaults';
tags: never;
}
// This file was automatically generated. Edits will be overwritten
export interface Typegen0 {
'@@xstate/typegen': true;
internalEvents: {
"done.invoke.settings.resetInjiProps:invocation[0]": { type: "done.invoke.settings.resetInjiProps:invocation[0]"; data: unknown; __tip: "See the XState TS docs to learn how to strongly type this." };
"error.platform.settings.resetInjiProps:invocation[0]": { type: "error.platform.settings.resetInjiProps:invocation[0]"; data: unknown };
"xstate.init": { type: "xstate.init" };
};
invokeSrcNameMap: {
"resetInjiProps": "done.invoke.settings.resetInjiProps:invocation[0]";
};
missingImplementations: {
actions: "setKeyManagementExplored";
delays: never;
guards: never;
services: never;
};
eventsCausingActions: {
"requestStoredContext": "xstate.init";
"resetCredentialRegistryResponse": "CANCEL" | "UPDATE_HOST";
"resetIsBiometricToggled": "DISMISS";
"resetKeyOrderingResponse": "RESET_KEY_ORDER_RESPONSE";
"setBackupAndRestoreOptionExplored": "SET_IS_BACKUP_AND_RESTORE_EXPLORED";
"setContext": "STORE_RESPONSE";
"setIsBiometricToggled": "TOGGLE_BIOMETRIC_UNLOCK";
"setKeyManagementExplored": "SET_KEY_MANAGEMENT_EXPLORED";
"setKeyManagementTourGuideExplored": "SET_KEY_MANAGEMENT_TOUR_GUIDE_EXPLORED";
"setKeyOrderingResponse": "SET_KEY_ORDER_RESPONSE";
"storeContext": "ACCEPT_HARDWARE_SUPPORT_NOT_EXISTS" | "SET_IS_BACKUP_AND_RESTORE_EXPLORED" | "SET_KEY_MANAGEMENT_EXPLORED" | "SHOWN_ACCOUNT_SELECTION_CONFIRMATION" | "STORE_RESPONSE" | "TOGGLE_BIOMETRIC_UNLOCK" | "UPDATE_HOST" | "UPDATE_NAME" | "UPDATE_VC_LABEL" | "done.invoke.settings.resetInjiProps:invocation[0]";
"toggleBiometricUnlock": "TOGGLE_BIOMETRIC_UNLOCK";
"updateCredentialRegistry": "done.invoke.settings.resetInjiProps:invocation[0]";
"updateCredentialRegistryResponse": "error.platform.settings.resetInjiProps:invocation[0]";
"updateCredentialRegistrySuccess": "done.invoke.settings.resetInjiProps:invocation[0]";
"updateDefaults": "STORE_RESPONSE";
"updateEsignetHostUrl": "UPDATE_HOST";
"updateIsAccountSelectionConfirmationShown": "SHOWN_ACCOUNT_SELECTION_CONFIRMATION";
"updateName": "UPDATE_NAME";
"updatePartialDefaults": "STORE_RESPONSE";
"updateUserShownWithHardwareKeystoreNotExists": "ACCEPT_HARDWARE_SUPPORT_NOT_EXISTS";
"updateVcLabel": "UPDATE_VC_LABEL";
};
eventsCausingDelays: {
};
eventsCausingGuards: {
"hasData": "STORE_RESPONSE";
"hasPartialData": "STORE_RESPONSE";
};
eventsCausingServices: {
"resetInjiProps": "UPDATE_HOST";
};
matchesStates: "idle" | "init" | "resetInjiProps" | "showInjiTourGuide" | "storingDefaults";
tags: never;
}

View File

@@ -22,7 +22,6 @@ import {NativeModules} from 'react-native';
import {
AUTH_TIMEOUT,
decryptJson,
DUMMY_KEY_FOR_BIOMETRIC_ALIAS,
ENCRYPTION_ID,
encryptJson,
HMAC_ALIAS,
@@ -274,6 +273,19 @@ export const storeMachine =
DECRYPT_ERROR: {
actions: sendParent('DECRYPT_ERROR'),
},
BIOMETRIC_CANCELLED: {
actions: [
send(
(_, event) => model.events.BIOMETRIC_CANCELLED(event.requester),
{
to: (_, event) => event.requester,
},
),
sendUpdate(),
sendParent('BIOMETRIC_CANCELLED')
],
target: 'checkFreshInstall',
}
},
},
},
@@ -290,18 +302,11 @@ export const storeMachine =
actions: sendParent('KEY_INVALIDATE_ERROR'),
},
BIOMETRIC_CANCELLED: {
actions: [
send(
(_, event) => model.events.BIOMETRIC_CANCELLED(event.requester),
{
to: (_, event) => event.requester,
},
),
sendUpdate(),
],
},
actions: [sendParent('BIOMETRIC_CANCELLED')],
target: 'checkFreshInstall'
},
},
},
{
actions: {
notifyParent: sendParent(model.events.READY()),
@@ -328,9 +333,17 @@ export const storeMachine =
}
return;
},
checkFreshInstall: () => async _ => {
const response = await getItem('auth', null, '');
return response;
checkFreshInstall: () => async callback => {
try{
return await getItem('auth', null, '');
}
catch(e){
if(e instanceof BiometricCancellationError){
callback(model.events.BIOMETRIC_CANCELLED());
} else {
callback(model.events.STORE_ERROR(e));
}
}
},
hasEncryptionKey: () => async callback => {
let hasSetCredentials;
@@ -350,6 +363,9 @@ export const storeMachine =
base64EncodedString,
);
} catch (e) {
if(e instanceof BiometricCancellationError){
callback(model.events.BIOMETRIC_CANCELLED(event.requester));
}
sendErrorEvent(getErrorEventData('ENCRYPTION', '', e));
if (e.message.includes(keyinvalidatedString)) {

View File

@@ -10,13 +10,13 @@ import {ActorRefFrom} from 'xstate';
import {VCItemMachine} from '../../../machines/VerifiableCredential/VCItemMachine/VCItemMachine';
export const HistoryTab: React.FC<HistoryTabProps> = props => {
const {t} = useTranslation('HistoryTab');
const {t} = useTranslation('HistoryScreen');
const controller = useKebabPopUp(props);
return (
<>
<Modal
headerLabel={props.vcMetadata.displayId}
headerLabel={t('historyHeaderLabel')}
isVisible={controller.isShowActivities}
onDismiss={controller.DISMISS}>
<Column fill>

View File

@@ -101,7 +101,9 @@ export const IssuersScreen: React.FC<
return (
controller.errorMessageType === ErrorMessage.TECHNICAL_DIFFICULTIES ||
controller.errorMessageType ===
ErrorMessage.CREDENTIAL_TYPE_DOWNLOAD_FAILURE
ErrorMessage.CREDENTIAL_TYPE_DOWNLOAD_FAILURE ||
controller.errorMessageType ===
ErrorMessage.AUTHORIZATION_GRANT_TYPE_NOT_SUPPORTED
);
}
@@ -213,7 +215,9 @@ export const IssuersScreen: React.FC<
showClose
primaryButtonTestID="tryAgain"
primaryButtonText={
controller.errorMessageType != ErrorMessage.TECHNICAL_DIFFICULTIES
controller.errorMessageType != ErrorMessage.TECHNICAL_DIFFICULTIES &&
controller.errorMessageType !=
ErrorMessage.AUTHORIZATION_GRANT_TYPE_NOT_SUPPORTED
? 'tryAgain'
: undefined
}

View File

@@ -6,6 +6,7 @@ import {
Pressable,
TouchableOpacity,
I18nManager,
View,
} from 'react-native';
import {Modal} from '../../components/ui/Modal';
import {Column, Row, Text} from '../../components/ui';
@@ -43,7 +44,7 @@ export const AboutInji: React.FC<AboutInjiProps> = ({appId}) => {
<ListItem.Content>
<ListItem.Title
{...testIDProps('aboutInjiTitle')}
style={{paddingTop: 3}}>
style={Theme.AboutInjiScreenStyle.titleStyle}>
<Text weight="semibold" color={Theme.Colors.settingsLabel}>
{t('aboutInji')}
</Text>
@@ -72,47 +73,32 @@ export const AboutInji: React.FC<AboutInjiProps> = ({appId}) => {
<Row>
<Text
weight="semibold"
style={{
maxWidth: 110,
paddingTop:
i18next.language == 'kn' || i18next.language == 'hi'
? 5
: 0,
}}>
style={Theme.AboutInjiScreenStyle.appIdTitleStyle}>
{t('appID')}
</Text>
<Text
weight="semibold"
style={{
paddingTop: i18next.language == 'hi' ? 2 : 0,
}}>
style={Theme.AboutInjiScreenStyle.appIdTextStyle}>
{I18nManager.isRTL ? appId : ' : ' + appId}
</Text>
</Row>
<CopyButton content={appId} />
</Row>
</LinearGradient>
<Column padding="12" align="space-between">
<Column
align="space-between"
style={Theme.AboutInjiScreenStyle.containerStyle}>
<Column>
<Text
testID="aboutDetails"
style={{...Theme.TextStyles.aboutDetails, paddingTop: 5}}>
style={Theme.AboutInjiScreenStyle.aboutDetailstextStyle}>
{t('aboutDetails')}
</Text>
<Row
align="space-between"
crossAlign="center"
style={{
maxWidth: Dimensions.get('window').width * 0.94,
minHeight: Dimensions.get('window').height * 0.1,
marginTop: 7,
}}>
<Text
style={{
...Theme.TextStyles.aboutDetails,
maxWidth: 150,
paddingTop: 10,
}}>
style={Theme.AboutInjiScreenStyle.innerContainerStyle}>
<Text style={Theme.AboutInjiScreenStyle.moreDetailstextStyle}>
{t('forMoreDetails')}
</Text>
<TouchableOpacity
@@ -123,7 +109,7 @@ export const AboutInji: React.FC<AboutInjiProps> = ({appId}) => {
<Text
testID="clickHere"
color={Theme.Colors.AddIdBtnBg}
style={{maxWidth: 150, paddingTop: 3}}
style={Theme.AboutInjiScreenStyle.clickHereTextStyle}
weight="bold">
{t('clickHere')}
</Text>
@@ -136,30 +122,36 @@ export const AboutInji: React.FC<AboutInjiProps> = ({appId}) => {
align="space-between"
crossAlign="center"
style={Theme.Styles.versionContainer}>
<Row>
<Row style={Theme.AboutInjiScreenStyle.injiVersionContainerStyle}>
<Text
testID="tuvaliVersion"
weight="semibold"
style={{paddingTop: 3}}
style={Theme.AboutInjiScreenStyle.injiVersionTitle}
color={Theme.Colors.aboutVersion}>
{t('version') + ' : '}
</Text>
<Text
weight="semibold"
style={{paddingTop: 3, maxWidth: 250}}
style={Theme.AboutInjiScreenStyle.injiVersionText}
color={Theme.Colors.aboutVersion}>
{__InjiVersion.getValue()}
</Text>
</Row>
{__TuvaliVersion.getpackageVersion() != 'unknown' && (
<Text
weight="semibold"
style={{paddingTop: 3, marginTop: 3}}
style={Theme.AboutInjiScreenStyle.tuvaliVerisonStyle}
color={Theme.Colors.aboutVersion}>
{t('tuvaliVersion')}: {__TuvaliVersion.getValue()}
</Text>
)}
<View style={Theme.AboutInjiScreenStyle.horizontalLineStyle} />
<Text
weight="semibold"
style={Theme.AboutInjiScreenStyle.poweredByTextStyle}
color="black">
{t('poweredBy')}
</Text>
</Column>
</Column>
</Modal>

View File

@@ -55,24 +55,6 @@ export const DataBackupAndRestore: React.FC = ({} = () => {
style={{paddingRight: 10, paddingTop: 10}}>
{t('dataBackupAndRestore')}
</Text>
{!controller.isBackupAndRestoreExplored && (
<LinearGradient
colors={Theme.Colors.GradientColors}
start={Theme.LinearGradientDirection.start}
end={Theme.LinearGradientDirection.end}
style={{
justifyContent: 'center',
height: 20,
marginTop: 10,
}}>
<Text
testID="newLabel"
style={Theme.Styles.newLabel}
color={Theme.Colors.whiteText}>
{t('new')}
</Text>
</LinearGradient>
)}
</Row>
</ListItem.Title>
</ListItem.Content>

View File

@@ -17,7 +17,6 @@ import {
SettingsEvents,
selectAppId,
selectEsignetHostUrl,
selectIsKeymanagementExplored,
selectIsKeymanagementTourGuideExplored,
selectIsKeyOrderSet,
} from '../../machines/settings';
@@ -129,10 +128,6 @@ export function useSettingsScreen(props: RootRouteProps & RequestRouteProps) {
settingsService || {},
selectBiometricUnlockEnabled,
),
isKeyManagementExplored: useSelector(
settingsService,
selectIsKeymanagementExplored,
),
isKeyManagementTourGuideExplored: useSelector(
settingsService,
selectIsKeymanagementTourGuideExplored,

View File

@@ -44,14 +44,6 @@ export const SettingsKeyManagementScreen: React.FC<
style={Theme.KeyManagementScreenStyle.textStyle}>
{t('header')}
</Text>
{!props.controller.isKeyManagementExplored && (
<Text
testID="newLabel"
style={Theme.Styles.newLabel}
color={Theme.Colors.whiteText}>
{t('NEW')}
</Text>
)}
</Row>
</ListItem.Title>
</ListItem.Content>

View File

@@ -139,14 +139,26 @@ class Cloud {
requestedOperation: appleAuth.Operation.LOGIN,
requestedScopes: [appleAuth.Scope.FULL_NAME, appleAuth.Scope.EMAIL],
});
const {email, nonce, identityToken, realUserStatus /* etc */} =
const {email, user, nonce, identityToken, realUserStatus /* etc */} =
appleAuthRequestResponse;
profileInfo = {email: email, picture: null};
await RNSecureKeystoreModule.storeData(
'userIdentifier',
JSON.stringify(appleAuthRequestResponse),
);
if (email) {
await RNSecureKeystoreModule.storeValueInCloud(user, email);
await RNSecureKeystoreModule.storeData(
'userIdentifier',
JSON.stringify({user,email}),
);
} else {
const userEmailFromCloud =
await RNSecureKeystoreModule.retrieveValueFromCloud(user);
profileInfo.email = userEmailFromCloud;
await RNSecureKeystoreModule.storeData(
'userIdentifier',
JSON.stringify({user,userEmailFromCloud}),
);
}
return {status: this.status.SUCCESS, profileInfo: profileInfo};
} catch (error) {
if (error.code === appleAuth.Error.CANCELED) {
@@ -206,13 +218,16 @@ class Cloud {
const userIdentifier = await RNSecureKeystoreModule.getData(
'userIdentifier',
)[1];
const userToken = JSON.parse(userIdentifier + '');
const user = userToken.user;
const email = userToken.email;
);
const userToken = JSON.parse(userIdentifier[1]);
const {user,email} = userToken;
const userEmail = email
? email
: await RNSecureKeystoreModule.retrieveValueFromCloud(user);
const credentialState = await appleAuth.getCredentialStateForUser(user);
const profileInfo = {email: email, picture: undefined};
const profileInfo = {email: userEmail, picture: undefined};
if (
credentialState === appleAuth.State.AUTHORIZED &&
isSignedIn === true

View File

@@ -7,6 +7,7 @@ import {
import {Protocols} from './openId4VCI/Utils';
import {getMosipIdentifier} from './commonUtil';
import {VCFormat} from './VCFormat';
import {isMosipVC} from './Utils';
const VC_KEY_PREFIX = 'VC';
const VC_ITEM_STORE_KEY_REGEX = '^VC_[a-zA-Z0-9_-]+$';
@@ -21,8 +22,9 @@ export class VCMetadata {
protocol?: string = '';
timestamp?: string = '';
isVerified: boolean = false;
displayId: string = '';
mosipIndividualId: string = '';
format: string = '';
isExpired: boolean = false;
downloadKeyType: string = '';
constructor({
@@ -34,9 +36,10 @@ export class VCMetadata {
protocol = '',
timestamp = '',
isVerified = false,
displayId = '',
mosipIndividualId = '',
format = '',
downloadKeyType = '',
isExpired = false,
} = {}) {
this.idType = idType;
this.requestId = requestId;
@@ -46,9 +49,10 @@ export class VCMetadata {
this.issuer = issuer;
this.timestamp = timestamp;
this.isVerified = isVerified;
this.displayId = displayId;
this.mosipIndividualId = mosipIndividualId;
this.format = format;
this.downloadKeyType = downloadKeyType;
this.isExpired = isExpired;
}
//TODO: Remove any typing and use appropriate typing
@@ -63,11 +67,12 @@ export class VCMetadata {
issuer: vc.issuer,
timestamp: vc.vcMetadata ? vc.vcMetadata.timestamp : vc.timestamp,
isVerified: vc.isVerified,
displayId: vc.displayId
? vc.displayId
isExpired: vc.isExpired,
mosipIndividualId: vc.mosipIndividualId
? vc.mosipIndividualId
: vc.vcMetadata
? vc.vcMetadata.displayId
: getDisplayId(vc.verifiableCredential, vc.format),
? vc.vcMetadata.mosipIndividualId
: getMosipIndividualId(vc.verifiableCredential, vc.issuer),
downloadKeyType: vc.downloadKeyType,
});
}
@@ -119,53 +124,31 @@ export const getVCMetadata = (context: object, keyType: string) => {
id: `${credentialId} + '_' + ${issuer}`,
timestamp: context.timestamp ?? '',
isVerified: context.vcMetadata.isVerified ?? false,
displayId: getDisplayId(
isExpired: context.vcMetadata.isExpired ?? false,
mosipIndividualId: getMosipIndividualId(
context['verifiableCredential'] as VerifiableCredential,
context['credentialWrapper'].format,
issuer
),
format: context['credentialWrapper'].format,
downloadKeyType: keyType,
});
};
const getDisplayId = (
const getMosipIndividualId = (
verifiableCredential: VerifiableCredential | Credential,
format: string,
issuer: string
) => {
try {
if (format === VCFormat.mso_mdoc) {
const namespaces =
(verifiableCredential as VerifiableCredential)?.processedCredential?.[
'issuerSigned'
]['nameSpaces'] ?? {};
let displayId: string | undefined;
for (const namespace in namespaces) {
displayId = namespaces[namespace].find(
(element: object) =>
element['elementIdentifier'] === 'document_number',
).elementValue;
if (!!displayId) break;
}
if (!!displayId) return displayId;
console.error('error in id getting ', 'Id not found for the credential');
throw new Error('Id not found for the credential');
const credential = verifiableCredential?.credential
? verifiableCredential.credential
: verifiableCredential;
const credentialSubject = credential?.credentialSubject;
if (isMosipVC(issuer)) {
return credentialSubject ? getMosipIdentifier(credentialSubject) : '';
}
if (verifiableCredential?.credential) {
if (verifiableCredential.credential?.credentialSubject) {
return (
verifiableCredential.credential?.credentialSubject?.policyNumber ||
getMosipIdentifier(verifiableCredential.credential.credentialSubject)
);
}
}
return (
verifiableCredential?.credentialSubject?.policyNumber ||
getMosipIdentifier(verifiableCredential.credentialSubject)
);
return '';
} catch (error) {
console.error('Error getting the display Id - ', error);
console.error('Error getting the display ID:', error);
return null;
}
};

View File

@@ -15,7 +15,7 @@ import {
sendImpressionEvent,
} from './telemetry/TelemetryUtils';
import {TelemetryConstants} from './telemetry/TelemetryConstants';
import NetInfo, {NetInfoState} from '@react-native-community/netinfo';
import NetInfo from '@react-native-community/netinfo';
export const API_URLS: ApiUrls = {
trustedVerifiersList: {
@@ -36,6 +36,11 @@ export const API_URLS: ApiUrls = {
buildURL: (issuerId: string): `/${string}` =>
`/v1/mimoto/issuers/${issuerId}/well-known-proxy`,
},
authorizationServerMetadataConfig: {
method: 'GET',
buildURL: (authorizationServerUrl: string): string =>
`${authorizationServerUrl}/.well-known/oauth-authorization-server`,
},
allProperties: {
method: 'GET',
buildURL: (): `/${string}` => '/v1/mimoto/allProperties',
@@ -125,6 +130,15 @@ export const API = {
);
return response;
},
fetchAuthorizationServerMetadata: async (authorizationServerUrl: string) => {
const response = await request(
API_URLS.authorizationServerMetadataConfig.method,
API_URLS.authorizationServerMetadataConfig.buildURL(authorizationServerUrl),
undefined,
'',
);
return response;
},
fetchAllProperties: async () => {
const response = await request(
API_URLS.allProperties.method,
@@ -170,6 +184,21 @@ export const CACHED_API = {
fetchCall: API.fetchIssuerWellknownConfig.bind(null, issuerId),
}),
fetchIssuerAuthorizationServerMetadata: (
authorizationServerUrl: string,
isCachePreferred: boolean = false,
) =>
generateCacheAPIFunction({
isCachePreferred,
cacheKey: API_CACHED_STORAGE_KEYS.fetchIssuerAuthorizationServerMetadata(
authorizationServerUrl,
),
fetchCall: API.fetchAuthorizationServerMetadata.bind(
null,
authorizationServerUrl,
),
}),
getAllProperties: (isCachePreferred: boolean) =>
generateCacheAPIFunction({
isCachePreferred,
@@ -257,7 +286,7 @@ async function generateCacheAPIFunctionWithAPIPreference(
onErrorHardCodedValue != undefined
}`);
console.log(error);
console.error(`The error in fetching api ${cacheKey}`,error);
var response=null;
if(!(await NetInfo.fetch()).isConnected){
response = await getItem(cacheKey, null, '');
@@ -316,6 +345,7 @@ type ApiUrls = {
issuersList: Api_Params;
issuerConfig: Api_Params;
issuerWellknownConfig: Api_Params;
authorizationServerMetadataConfig: Api_Params;
allProperties: Api_Params;
getIndividualId: Api_Params;
reqIndividualOTP: Api_Params;

View File

@@ -69,6 +69,8 @@ export const API_CACHED_STORAGE_KEYS = {
`CACHE_FETCH_ISSUER_CONFIG_${issuerId}`,
fetchIssuerWellknownConfig: (issuerId: string) =>
`CACHE_FETCH_ISSUER_WELLKNOWN_CONFIG_${issuerId}`,
fetchIssuerAuthorizationServerMetadata: (authorizationServerUrl: string) =>
`CACHE_FETCH_ISSUER_AUTHORIZATION_SERVER_METADATA_${authorizationServerUrl}`,
fetchTrustedVerifiers: 'CACHE_FETCH_TRUSTED_VERIFIERS',
};
@@ -159,5 +161,10 @@ export const copilotTestID = {
'6': 'cardView',
};
export const FACE_SDK_MODEL_PATH = isAndroid() ? 'assets:faceModel.tflite' : 'bundle:/faceModel.tflite'
export const FACE_SDK_MODEL_CHECKSUM = '797b4d99794965749635352d55da38d4748c28c659ee1502338badee4614ed06'
export const FACE_SDK_MODEL_PATH = isAndroid()
? 'assets:faceModel.tflite'
: 'bundle:/faceModel.tflite';
export const FACE_SDK_MODEL_CHECKSUM =
'797b4d99794965749635352d55da38d4748c28c659ee1502338badee4614ed06';
export const EXPIRED_VC_ERROR_CODE = 'ERR_VC_EXPIRED';

View File

@@ -15,7 +15,7 @@ import {
import {
BOTTOM_SECTION_FIELDS_WITH_DETAILED_ADDRESS_FIELDS,
DETAIL_VIEW_ADD_ON_FIELDS,
getIdType,
getCredentialTypeFromWellKnown,
} from '../../components/VC/common/VCUtils';
import {getVerifiableCredential} from '../../machines/VerifiableCredential/VCItemMachine/VCItemSelectors';
import {vcVerificationBannerDetails} from '../../components/BannerNotificationContainer';
@@ -44,14 +44,13 @@ export function getVcVerificationDetails(
verifiableCredential,
wellknown: Object,
): vcVerificationBannerDetails {
const idType = getIdType(
const credentialType = getCredentialTypeFromWellKnown(
wellknown,
getVerifiableCredential(verifiableCredential).credentialConfigurationId,
);
return {
statusType: statusType,
vcType: idType,
vcNumber: vcMetadata.displayId,
vcType: credentialType,
};
}
@@ -151,8 +150,7 @@ export const constructAuthorizationConfiguration = (
redirectUrl: selectedIssuer.redirect_uri,
additionalParameters: {ui_locales: i18n.language},
serviceConfiguration: {
authorizationEndpoint:
selectedIssuer.authorization_servers[0] + '/authorize',
authorizationEndpoint: selectedIssuer.authorizationEndpoint,
tokenEndpoint: selectedIssuer.token_endpoint,
},
};
@@ -256,13 +254,17 @@ export const vcDownloadTimeout = async (): Promise<number> => {
};
// OIDCErrors is a collection of external errors from the OpenID library or the issuer
export enum OIDCErrors {
OIDC_FLOW_CANCELLED_ANDROID = 'User cancelled flow',
OIDC_FLOW_CANCELLED_IOS = 'org.openid.appauth.general error -3',
export const OIDCErrors = {
OIDC_FLOW_CANCELLED_ANDROID : 'User cancelled flow',
OIDC_FLOW_CANCELLED_IOS : 'org.openid.appauth.general error -3',
INVALID_TOKEN_SPECIFIED = 'Invalid token specified',
OIDC_CONFIG_ERROR_PREFIX = 'Config error',
}
INVALID_TOKEN_SPECIFIED: 'Invalid token specified',
OIDC_CONFIG_ERROR_PREFIX: 'Config error',
AUTHORIZATION_ENDPOINT_DISCOVERY: {
GRANT_TYPE_NOT_SUPPORTED: 'Grant type not supported by Wallet',
},
};
// ErrorMessage is the type of error message shown in the UI
@@ -273,6 +275,7 @@ export enum ErrorMessage {
BIOMETRIC_CANCELLED = 'biometricCancelled',
TECHNICAL_DIFFICULTIES = 'technicalDifficulty',
CREDENTIAL_TYPE_DOWNLOAD_FAILURE = 'credentialTypeListDownloadFailure',
AUTHORIZATION_GRANT_TYPE_NOT_SUPPORTED = 'authorizationGrantTypeNotSupportedByWallet',
}
export async function constructProofJWT(