From 10ed1e956d01c91628a97652dde5e6726ee3f3f0 Mon Sep 17 00:00:00 2001 From: vkanellopoulos Date: Mon, 1 Apr 2024 14:41:22 +0300 Subject: [PATCH] use of CredentialResponseEncryptionPolicy and other minor changes --- .../wallet/document/issue/openid4vci/OpenId4VciManager.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wallet-core/src/main/java/eu/europa/ec/eudi/wallet/document/issue/openid4vci/OpenId4VciManager.kt b/wallet-core/src/main/java/eu/europa/ec/eudi/wallet/document/issue/openid4vci/OpenId4VciManager.kt index b0d11b11..97009c4c 100644 --- a/wallet-core/src/main/java/eu/europa/ec/eudi/wallet/document/issue/openid4vci/OpenId4VciManager.kt +++ b/wallet-core/src/main/java/eu/europa/ec/eudi/wallet/document/issue/openid4vci/OpenId4VciManager.kt @@ -32,6 +32,7 @@ import eu.europa.ec.eudi.openid4vci.CredentialConfigurationIdentifier import eu.europa.ec.eudi.openid4vci.CredentialIssuerId import eu.europa.ec.eudi.openid4vci.CredentialIssuerMetadata import eu.europa.ec.eudi.openid4vci.CredentialOffer +import eu.europa.ec.eudi.openid4vci.CredentialResponseEncryptionPolicy import eu.europa.ec.eudi.openid4vci.DefaultHttpClientFactory import eu.europa.ec.eudi.openid4vci.IssuanceRequestPayload import eu.europa.ec.eudi.openid4vci.IssuedCredential @@ -82,7 +83,7 @@ class OpenId4VciManager( clientId = config.clientId, authFlowRedirectionURI = context.openId4VciAuthorizationRedirectUri, keyGenerationConfig = KeyGenerationConfig(Curve.P_256, 2048), - preferEncryptedResponsesWhenSupported = true + credentialResponseEncryptionPolicy = CredentialResponseEncryptionPolicy.SUPPORTED ) private val proofAlgorithm @@ -133,7 +134,7 @@ class OpenId4VciManager( credentialConfigurationIdentifiers = listOf(credentialConfigurationId) ) - val issuer = Issuer.make(openId4VCIConfig, credentialOffer) + val issuer = Issuer.make(openId4VCIConfig, credentialOffer).getOrThrow() val prepareAuthorizationCodeRequest: AuthorizationRequestPrepared = issuer.prepareAuthorizationRequest().getOrThrow()