From 98d494d68f0b799986edd98cede5a38b29144b88 Mon Sep 17 00:00:00 2001 From: PascalDR Date: Thu, 2 Nov 2023 12:28:14 +0100 Subject: [PATCH] Moved code relative to openid4vp in the relative package --- pyeudiw/federation/schemas/wallet_relying_party.py | 12 +----------- pyeudiw/openid4vp/schemas/wallet_relying_party.py | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 11 deletions(-) create mode 100644 pyeudiw/openid4vp/schemas/wallet_relying_party.py diff --git a/pyeudiw/federation/schemas/wallet_relying_party.py b/pyeudiw/federation/schemas/wallet_relying_party.py index c6ea97fd..2deb170a 100644 --- a/pyeudiw/federation/schemas/wallet_relying_party.py +++ b/pyeudiw/federation/schemas/wallet_relying_party.py @@ -1,8 +1,8 @@ from enum import Enum from typing import Any, List from pyeudiw.jwk.schema import JwksSchema -from pydantic import BaseModel, HttpUrl from pydantic import BaseModel, HttpUrl, PositiveInt +from pyeudiw.openid4vp.schemas.wallet_relying_party import VPFormat class AcrValuesSupported(str, Enum): spid_l1 = "https://www.spid.gov.it/SpidL1" @@ -37,16 +37,6 @@ class AuthorizationSignedResponseAlg(str, Enum): rs256 = "RS256" es256 = "ES256" -class VPSigningAlgResponseSupported(str, Enum): - eddsa = "EdDSA" - es256k = "ES256K" - -class VPAlgorithmSchema(BaseModel): - alg: List[VPSigningAlgResponseSupported] - -class VPFormat(BaseModel): - jwt_vp_json: VPAlgorithmSchema - class WalletRelyingParty(BaseModel): application_type: str client_id: HttpUrl diff --git a/pyeudiw/openid4vp/schemas/wallet_relying_party.py b/pyeudiw/openid4vp/schemas/wallet_relying_party.py new file mode 100644 index 00000000..7bb46a6f --- /dev/null +++ b/pyeudiw/openid4vp/schemas/wallet_relying_party.py @@ -0,0 +1,14 @@ +from enum import Enum +from typing import List +from pydantic import BaseModel + + +class VPSigningAlgResponseSupported(str, Enum): + eddsa = "EdDSA" + es256k = "ES256K" + +class VPAlgorithmSchema(BaseModel): + alg: List[VPSigningAlgResponseSupported] + +class VPFormat(BaseModel): + jwt_vp_json: VPAlgorithmSchema \ No newline at end of file