From 536046a3d3ec46f7f07ee956275fefb47fcf503f Mon Sep 17 00:00:00 2001 From: Simon Mueller Date: Wed, 2 Oct 2024 16:59:54 +0200 Subject: [PATCH] Fix variable names in test cases --- .../at/asitplus/wallet/lib/oidc/AuthenticationRequest.kt | 6 +++--- .../at/asitplus/wallet/lib/oauth2/OAuth2ClientTest.kt | 4 ++-- .../at/asitplus/wallet/lib/oidvci/OidvciInteropTest.kt | 8 ++++---- .../at/asitplus/wallet/lib/oidvci/OidvciProcessTest.kt | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/vck-openid/src/commonMain/kotlin/at/asitplus/wallet/lib/oidc/AuthenticationRequest.kt b/vck-openid/src/commonMain/kotlin/at/asitplus/wallet/lib/oidc/AuthenticationRequest.kt index 44b40ee3..b7bfbfea 100644 --- a/vck-openid/src/commonMain/kotlin/at/asitplus/wallet/lib/oidc/AuthenticationRequest.kt +++ b/vck-openid/src/commonMain/kotlin/at/asitplus/wallet/lib/oidc/AuthenticationRequest.kt @@ -1,10 +1,8 @@ -@file:UseSerializers(JwsSignedSerializer::class, UrlSerializer::class) - package at.asitplus.wallet.lib.oidc import at.asitplus.catching -import at.asitplus.dif.rqes.UrlSerializer +import at.asitplus.dif.rqes.Serializer.UrlSerializer import at.asitplus.openid.AuthenticationRequestParameters import at.asitplus.signum.indispensable.josef.JwsSigned import io.ktor.http.* @@ -30,6 +28,7 @@ sealed class AuthenticationRequestParametersFrom { @Serializable @SerialName("JwsSigned") data class JwsSigned( + @Serializable(JwsSignedSerializer::class) val jwsSigned: at.asitplus.signum.indispensable.josef.JwsSigned, override val parameters: AuthenticationRequestParameters, ) : AuthenticationRequestParametersFrom() @@ -37,6 +36,7 @@ sealed class AuthenticationRequestParametersFrom { @Serializable @SerialName("Uri") data class Uri( + @Serializable(UrlSerializer::class) val url: Url, override val parameters: AuthenticationRequestParameters, ) : AuthenticationRequestParametersFrom() diff --git a/vck-openid/src/commonTest/kotlin/at/asitplus/wallet/lib/oauth2/OAuth2ClientTest.kt b/vck-openid/src/commonTest/kotlin/at/asitplus/wallet/lib/oauth2/OAuth2ClientTest.kt index 5eba8336..1cd79117 100644 --- a/vck-openid/src/commonTest/kotlin/at/asitplus/wallet/lib/oauth2/OAuth2ClientTest.kt +++ b/vck-openid/src/commonTest/kotlin/at/asitplus/wallet/lib/oauth2/OAuth2ClientTest.kt @@ -40,7 +40,7 @@ class OAuth2ClientTest : FunSpec({ authorization = OAuth2Client.AuthorizationForToken.PreAuthCode(preAuth), ) val token = server.token(tokenRequest).getOrThrow() - token.authorizationDetails.shouldBeNull() + token.authorizationDetailsList.shouldBeNull() } test("process with pre-authorized code, can't use it twice") { @@ -71,7 +71,7 @@ class OAuth2ClientTest : FunSpec({ authorization = OAuth2Client.AuthorizationForToken.Code(code), ) val token = server.token(tokenRequest).getOrThrow() - token.authorizationDetails.shouldBeNull() + token.authorizationDetailsList.shouldBeNull() } }) \ No newline at end of file diff --git a/vck-openid/src/commonTest/kotlin/at/asitplus/wallet/lib/oidvci/OidvciInteropTest.kt b/vck-openid/src/commonTest/kotlin/at/asitplus/wallet/lib/oidvci/OidvciInteropTest.kt index 43a24162..4f96e37c 100644 --- a/vck-openid/src/commonTest/kotlin/at/asitplus/wallet/lib/oidvci/OidvciInteropTest.kt +++ b/vck-openid/src/commonTest/kotlin/at/asitplus/wallet/lib/oidvci/OidvciInteropTest.kt @@ -228,8 +228,8 @@ class OidvciInteropTest : FunSpec({ ) ) val token = authorizationService.token(tokenRequest).getOrThrow() - token.authorizationDetails.shouldNotBeNull() - val first = token.authorizationDetails!!.first().shouldBeInstanceOf() + token.authorizationDetailsList.shouldNotBeNull() + val first = token.authorizationDetailsList!!.first().shouldBeInstanceOf() val credentialRequest = client.createCredentialRequest( input = WalletService.CredentialRequestInput.CredentialIdentifier(first.credentialConfigurationId!!), clientNonce = token.clientNonce, @@ -265,7 +265,7 @@ class OidvciInteropTest : FunSpec({ authorizationDetails = authorizationDetails ) val token = authorizationService.token(tokenRequest).getOrThrow() - token.authorizationDetails.shouldNotBeNull() + token.authorizationDetailsList.shouldNotBeNull() val credentialRequest = client.createCredentialRequest( input = WalletService.CredentialRequestInput.RequestOptions(requestOptions), clientNonce = token.clientNonce, @@ -297,7 +297,7 @@ class OidvciInteropTest : FunSpec({ resource = issuer.metadata.credentialIssuer, ) val token = authorizationService.token(tokenRequest).getOrThrow() - token.authorizationDetails.shouldBeNull() + token.authorizationDetailsList.shouldBeNull() val credentialRequest = client.createCredentialRequest( input = WalletService.CredentialRequestInput.Format(supportedCredentialFormat), diff --git a/vck-openid/src/commonTest/kotlin/at/asitplus/wallet/lib/oidvci/OidvciProcessTest.kt b/vck-openid/src/commonTest/kotlin/at/asitplus/wallet/lib/oidvci/OidvciProcessTest.kt index 76c3816d..bed66c4d 100644 --- a/vck-openid/src/commonTest/kotlin/at/asitplus/wallet/lib/oidvci/OidvciProcessTest.kt +++ b/vck-openid/src/commonTest/kotlin/at/asitplus/wallet/lib/oidvci/OidvciProcessTest.kt @@ -166,8 +166,8 @@ class OidvciProcessTest : FunSpec({ ) ) val token = authorizationService.token(tokenRequest).getOrThrow() - token.authorizationDetails.shouldNotBeNull() - val first = token.authorizationDetails!!.first().shouldBeInstanceOf() + token.authorizationDetailsList.shouldNotBeNull() + val first = token.authorizationDetailsList!!.first().shouldBeInstanceOf() val credentialRequest = client.createCredentialRequest( input = WalletService.CredentialRequestInput.CredentialIdentifier(first.credentialConfigurationId!!), clientNonce = token.clientNonce,