Skip to content

Commit

Permalink
chore: notes on todos
Browse files Browse the repository at this point in the history
  • Loading branch information
peppelinux committed Nov 21, 2024
1 parent 6abec75 commit 1e97344
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pyeudiw/sd_jwt/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def __init__(self, error_location: any):

class SDJWTCommon:
SD_JWT_HEADER = os.getenv(
# TODO: dc is only for digital credential, while you might use another typ ...
# NOTE: dc is only for Digital Credential, while you might use another typ ...
"SD_JWT_HEADER", "dc+sd-jwt"
) # overwriteable with extra_header_parameters = {"typ": "other-example+sd-jwt"}
KB_JWT_TYP_HEADER = "kb+jwt"
Expand Down
10 changes: 7 additions & 3 deletions pyeudiw/sd_jwt/verifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,12 @@ def _verify_sd_jwt(
keys=issuer_public_key,
sigalg=sign_alg
)
# self._sd_jwt_payload = loads(parsed_input_sd_jwt.payload.decode("utf-8"))
# TODO: Check exp/nbf/iat

# TODO: Check exp/nbf/iat and if not valid log a warning
# this lib should evaluate the signature and the data schema
# it's up to the consumer of the jwt and according to its policies in use
# decide if accept or reject the jwt according to its datetimes

else:
raise ValueError(
f"Unsupported serialization format: {self._serialization_format}"
Expand Down Expand Up @@ -235,4 +239,4 @@ def _unpack_disclosed_claims(self, sd_jwt_claims):
return pre_output

else:
return sd_jwt_claims
return sd_jwt_claims

0 comments on commit 1e97344

Please sign in to comment.