Skip to content

Commit 3308901

Browse files
committed
Fix entity name to AuthorizationSession from OpenId4VCIEntity. Import error
1 parent 0580edb commit 3308901

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

pyeudiw/satosa/frontends/openid4vci/endpoints/base_credential_endpoint.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
OpenId4VciBaseModel,
2626
)
2727
from pyeudiw.satosa.frontends.openid4vci.storage.engine import OpenId4VciDBEngineHandler
28-
from pyeudiw.satosa.frontends.openid4vci.storage.entity import OpenId4VCIEntity
28+
from pyeudiw.satosa.frontends.openid4vci.storage.entity import AuthorizationSession
2929
from pyeudiw.satosa.frontends.openid4vci.tools.exceptions import (
3030
InvalidScopeException,
3131
MissingProofJWTException,
@@ -166,7 +166,7 @@ def validate_request(self, context: Context, entity: dict) -> OpenId4VciBaseMode
166166

167167
@abstractmethod
168168
def to_response(
169-
self, context: Context, entity: OpenId4VCIEntity, credential_id: str | None
169+
self, context: Context, entity: AuthorizationSession, credential_id: str | None
170170
) -> Response:
171171
pass
172172

@@ -182,7 +182,7 @@ def build_credential(
182182
)
183183
return credential_list
184184

185-
vci_entity = OpenId4VCIEntity(**entity)
185+
vci_entity = AuthorizationSession(**entity)
186186

187187
user = self._db_user_engine.get_by_fields(
188188
self._extract_lookup_identifiers(vci_entity.attributes or {})
@@ -196,7 +196,7 @@ def build_credential(
196196

197197
def _build_credential(
198198
self,
199-
opendid4vci_entity: OpenId4VCIEntity,
199+
opendid4vci_entity: AuthorizationSession,
200200
user_entity: tuple[str, UserEntity],
201201
cred_key: str,
202202
) -> str:
@@ -246,7 +246,7 @@ def _issue_mso_mdoc(
246246
return mdoci.dumps().decode()
247247

248248
def _issue_sd_jwt(
249-
self, user_entity: tuple[str, UserEntity], entity: OpenId4VCIEntity, template
249+
self, user_entity: tuple[str, UserEntity], entity: AuthorizationSession, template
250250
) -> dict:
251251
now = iat_now()
252252
exp = exp_from_now(self.config_utils.get_jwt().default_exp)

0 commit comments

Comments
 (0)