diff --git a/lib/app/shared/constants/urls.dart b/lib/app/shared/constants/urls.dart index f704d3018..72ca1f378 100644 --- a/lib/app/shared/constants/urls.dart +++ b/lib/app/shared/constants/urls.dart @@ -15,54 +15,103 @@ class Urls { }; static const String issuerBaseUrl = 'https://issuer.talao.co'; + + /// phone pass static const String phonePassUrl = 'https://issuer.talao.co/phonepass'; + + /// email pass static const String emailPassUrl = 'https://issuer.talao.co/emailpass'; static const String emailPassUrlJWTVCJSON = 'https://issuer.talao.co/emailpass?format=jwt_vc_json'; + /// tezotopia voucher static const String tezotopiaVoucherUrl = 'https://issuer.tezotopia.altme.io/issuer/voucher_mobile'; + /// tezotopia membership static const String tezotopiaMembershipCardUrl = 'https://issuer.talao.co/tezotopia/membershipcard/'; + /// liveness static const String livenessCardUrl = - 'https://issuer.talao.co/passbase/endpoint/liveness'; - + 'https://talao.co/id360/oidc4vc?format=ldp_vc&type=liveness'; static const String livenessCardJWTVCJSON = - 'https://talao.co/id360/oidc4vc?type=liveness'; + 'https://talao.co/id360/oidc4vc?format=jwt_vc_json&type=liveness'; + /// polygon static const String defaultPolygonIdCardUrl = 'https://issuer.talao.co/credential-manifest/polygonid/default'; + /// KYC Age static const String kycAgeCredentialUrl = 'https://issuer.talao.co/credential-manifest/polygonid/kycagecredential'; + + /// KYC Country static const String kycCountryOfResidenceUrl = 'https://issuer.talao.co/credential-manifest/polygonid/kyccountryofresidencecredential'; + /// twitter proof static const String proofOfTwitterStatsUrl = 'https://issuer.talao.co/credential-manifest/polygonid/ProofOfTwitterStats'; + /// civic pass static const String civicPassCredentialUrl = 'https://issuer.talao.co/credential-manifest/polygonid/civicpasscredential'; + /// chainborn membership static const String chainbornMembershipCardUrl = 'https://issuer.talao.co/chainborn/membershipcard/'; + /// twitter card static const String twitterCardUrl = 'https://issuer.talao.co/twitter/'; - static const String identityCardUrlLDPVC = + /// verifiableIdCard + static const String verifiableIdCardUrlLDPVC = 'https://talao.co/id360/oidc4vc?format=ldp_vc&type=verifiableid'; - static const String identityCardUrlJWTVCJSON = + static const String verifiableIdCardUrlJWTVCJSON = 'https://talao.co/id360/oidc4vc?format=jwt_vc_json&type=verifiableid'; - static const String identityCardUrlVCSDJWT = + static const String verifiableIdCardUrlVCSDJWT = 'https://talao.co/id360/oidc4vc?format=vcsd-jwt&type=identitycredential'; + /// over 13 + static const String over13Url = + 'https://talao.co/id360/oidc4vc?format=ldp_vc&type=over13'; + static const String over13JWTVCJSON = + 'https://talao.co/id360/oidc4vc?format=jwt_vc_json&type=over13'; + + /// over 15 + static const String over15Url = + 'https://talao.co/id360/oidc4vc?format=ldp_vc&type=over15'; + static const String over15JWTVCJSON = + 'https://talao.co/id360/oidc4vc?format=jwt_vc_json&type=over15'; + + /// over 18 + static const String over18Url = + 'https://talao.co/id360/oidc4vc?format=ldp_vc&type=over18'; static const String over18JWTVCJSON = - 'https://talao.co/id360/oidc4vc?type=over18'; - + 'https://talao.co/id360/oidc4vc?format=jwt_vc_json&type=over18'; + + /// over 21 + static const String over21Url = + 'https://talao.co/id360/oidc4vc?format=ldp_vc&type=over21'; + static const String over21JWTVCJSON = + 'https://talao.co/id360/oidc4vc?format=jwt_vc_json&type=over21'; + + /// over 50 + static const String over50Url = + 'https://talao.co/id360/oidc4vc?format=ldp_vc&type=over50'; + static const String over50JWTVCJSON = + 'https://talao.co/id360/oidc4vc?format=jwt_vc_json&type=over50'; + + /// over 65 + static const String over65Url = + 'https://talao.co/id360/oidc4vc?format=ldp_vc&type=over65'; + static const String over65JWTVCJSON = + 'https://talao.co/id360/oidc4vc?format=jwt_vc_json&type=over65'; + + /// linkedin card static const String linkedinCardUrl = 'https://issuer.talao.co/passbase/endpoint/linkedincard/'; static const String talaoIpfsGateway = 'https://talao.mypinata.cloud/ipfs/'; diff --git a/lib/app/shared/enum/type/credential_subject_type/credential_subject_type_extension.dart b/lib/app/shared/enum/type/credential_subject_type/credential_subject_type_extension.dart index 68e5ef9d5..35e860f4b 100644 --- a/lib/app/shared/enum/type/credential_subject_type/credential_subject_type_extension.dart +++ b/lib/app/shared/enum/type/credential_subject_type/credential_subject_type_extension.dart @@ -761,7 +761,18 @@ extension CredentialSubjectTypeExtension on CredentialSubjectType { case CredentialSubjectType.over13: image = ImageStrings.dummyOver13Card; - link = ''; + + switch (vcFormatType) { + case VCFormatType.ldpVc: + link = Urls.over13Url; + case VCFormatType.jwtVcJson: + link = Urls.over13JWTVCJSON; + case VCFormatType.jwtVc: + case VCFormatType.jwtVcJsonLd: + case VCFormatType.vcSdJWT: + link = ''; + } + whyGetThisCard = ResponseString.RESPONSE_STRING_over13WhyGetThisCard; expirationDateDetails = ResponseString.RESPONSE_STRING_over13ExpirationDate; @@ -769,7 +780,18 @@ extension CredentialSubjectTypeExtension on CredentialSubjectType { case CredentialSubjectType.over15: image = ImageStrings.dummyOver15Card; - link = ''; + + switch (vcFormatType) { + case VCFormatType.ldpVc: + link = Urls.over15Url; + case VCFormatType.jwtVcJson: + link = Urls.over15JWTVCJSON; + case VCFormatType.jwtVc: + case VCFormatType.jwtVcJsonLd: + case VCFormatType.vcSdJWT: + link = ''; + } + whyGetThisCard = ResponseString.RESPONSE_STRING_over15WhyGetThisCard; expirationDateDetails = ResponseString.RESPONSE_STRING_over15ExpirationDate; @@ -783,7 +805,7 @@ extension CredentialSubjectTypeExtension on CredentialSubjectType { /// id360 link use to oidc4vc over18 credential. /// another link is automatically used when getting the credential /// through yoti. - link = 'https://talao.co/id360/oidc4vc?format=ldp_vc&type=over18'; + link = Urls.over18Url; case VCFormatType.jwtVcJson: link = Urls.over18JWTVCJSON; case VCFormatType.jwtVc: @@ -798,7 +820,18 @@ extension CredentialSubjectTypeExtension on CredentialSubjectType { case CredentialSubjectType.over21: image = ImageStrings.dummyOver21Card; - link = ''; + + switch (vcFormatType) { + case VCFormatType.ldpVc: + link = Urls.over21Url; + case VCFormatType.jwtVcJson: + link = Urls.over21JWTVCJSON; + case VCFormatType.jwtVc: + case VCFormatType.jwtVcJsonLd: + case VCFormatType.vcSdJWT: + link = ''; + } + whyGetThisCard = ResponseString.RESPONSE_STRING_over18WhyGetThisCard; expirationDateDetails = ResponseString.RESPONSE_STRING_over18ExpirationDate; @@ -806,7 +839,18 @@ extension CredentialSubjectTypeExtension on CredentialSubjectType { case CredentialSubjectType.over50: image = ImageStrings.dummyOver50Card; - link = ''; + + switch (vcFormatType) { + case VCFormatType.ldpVc: + link = Urls.over50Url; + case VCFormatType.jwtVcJson: + link = Urls.over50JWTVCJSON; + case VCFormatType.jwtVc: + case VCFormatType.jwtVcJsonLd: + case VCFormatType.vcSdJWT: + link = ''; + } + whyGetThisCard = ResponseString.RESPONSE_STRING_over18WhyGetThisCard; expirationDateDetails = ResponseString.RESPONSE_STRING_over18ExpirationDate; @@ -814,7 +858,18 @@ extension CredentialSubjectTypeExtension on CredentialSubjectType { case CredentialSubjectType.over65: image = ImageStrings.dummyOver65Card; - link = ''; + + switch (vcFormatType) { + case VCFormatType.ldpVc: + link = Urls.over65Url; + case VCFormatType.jwtVcJson: + link = Urls.over65JWTVCJSON; + case VCFormatType.jwtVc: + case VCFormatType.jwtVcJsonLd: + case VCFormatType.vcSdJWT: + link = ''; + } + whyGetThisCard = ResponseString.RESPONSE_STRING_over18WhyGetThisCard; expirationDateDetails = ResponseString.RESPONSE_STRING_over18ExpirationDate; @@ -844,14 +899,14 @@ extension CredentialSubjectTypeExtension on CredentialSubjectType { switch (vcFormatType) { case VCFormatType.ldpVc: - link = Urls.identityCardUrlLDPVC; + link = Urls.verifiableIdCardUrlLDPVC; case VCFormatType.jwtVcJson: - link = Urls.identityCardUrlJWTVCJSON; + link = Urls.verifiableIdCardUrlJWTVCJSON; case VCFormatType.jwtVc: case VCFormatType.jwtVcJsonLd: link = ''; case VCFormatType.vcSdJWT: - link = Urls.identityCardUrlVCSDJWT; + link = Urls.verifiableIdCardUrlVCSDJWT; } whyGetThisCard = diff --git a/pubspec.yaml b/pubspec.yaml index d69ce0fbf..8b0b36fd1 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: altme description: AltMe Flutter App -version: 2.3.4+394 +version: 2.3.5+395 environment: sdk: ">=3.1.0 <4.0.0"