From 981f6dd107f38da5995de08d49879f292ae1bce5 Mon Sep 17 00:00:00 2001 From: Peter Sorotokin Date: Fri, 22 Nov 2024 13:32:40 -0800 Subject: [PATCH] Presentation during issuance fixes. (#795) Signed-off-by: Peter Sorotokin --- .../identity/issuance/evidence/EvidenceRequestOpenid4Vp.kt | 3 ++- .../com/android/identity/issuance/funke/FunkeProofingState.kt | 2 +- .../ui/destination/provisioncredential/EvidenceRequest.kt | 4 +++- wallet/src/main/res/values/strings.xml | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/identity-issuance/src/main/java/com/android/identity/issuance/evidence/EvidenceRequestOpenid4Vp.kt b/identity-issuance/src/main/java/com/android/identity/issuance/evidence/EvidenceRequestOpenid4Vp.kt index 9fc9704c4..24c04ea98 100644 --- a/identity-issuance/src/main/java/com/android/identity/issuance/evidence/EvidenceRequestOpenid4Vp.kt +++ b/identity-issuance/src/main/java/com/android/identity/issuance/evidence/EvidenceRequestOpenid4Vp.kt @@ -2,5 +2,6 @@ package com.android.identity.issuance.evidence class EvidenceRequestOpenid4Vp( val originUri: String, - val request: String + val request: String, + val cancelText: String? = null ): EvidenceRequest() \ No newline at end of file diff --git a/identity-issuance/src/main/java/com/android/identity/issuance/funke/FunkeProofingState.kt b/identity-issuance/src/main/java/com/android/identity/issuance/funke/FunkeProofingState.kt index b4cda56d7..633a71f71 100644 --- a/identity-issuance/src/main/java/com/android/identity/issuance/funke/FunkeProofingState.kt +++ b/identity-issuance/src/main/java/com/android/identity/issuance/funke/FunkeProofingState.kt @@ -125,7 +125,7 @@ class FunkeProofingState( } else { if (openid4VpRequest != null) { val uri = URI(authorizationMetadata.authorizationChallengeEndpoint!!) - val origin = uri.scheme + ":" + uri.authority + val origin = uri.scheme + "//:" + uri.authority list.add(EvidenceRequestOpenid4Vp(origin, openid4VpRequest!!)) } list.add(EvidenceRequestWeb(authorizeUrl, proofingInfo.landingUrl)) diff --git a/wallet/src/main/java/com/android/identity_credential/wallet/ui/destination/provisioncredential/EvidenceRequest.kt b/wallet/src/main/java/com/android/identity_credential/wallet/ui/destination/provisioncredential/EvidenceRequest.kt index 36900d9f6..0af009caa 100644 --- a/wallet/src/main/java/com/android/identity_credential/wallet/ui/destination/provisioncredential/EvidenceRequest.kt +++ b/wallet/src/main/java/com/android/identity_credential/wallet/ui/destination/provisioncredential/EvidenceRequest.kt @@ -1746,7 +1746,9 @@ fun EvidenceRequestOpenid4Vp( modifier = Modifier.padding(8.dp), onClick = {provisioningViewModel.moveToNextEvidenceRequest()} ) { - Text(text = stringResource(id = R.string.presentation_evidence_cancel)) + Text(text = evidenceRequest.cancelText ?: + stringResource(id = R.string.presentation_evidence_cancel) + ) } } } diff --git a/wallet/src/main/res/values/strings.xml b/wallet/src/main/res/values/strings.xml index a2f22284d..f7e1eadce 100644 --- a/wallet/src/main/res/values/strings.xml +++ b/wallet/src/main/res/values/strings.xml @@ -402,7 +402,7 @@ You can do this by presenting the eID you have in your wallet. Present eID - Cancel + Use Web Browser Go back