Skip to content

Commit

Permalink
fix: sd-jwt regex to allow key binding JWT
Browse files Browse the repository at this point in the history
Signed-off-by: Char Howland <char@indicio.tech>
  • Loading branch information
cjhowland committed Sep 14, 2023
1 parent 3c74952 commit 522a6c1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion aries_cloudagent/messaging/valid.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ class SDJSONWebToken(Regexp):
"~WyJPMTFySVRjRTdHcXExYW9oRkd0aDh3IiwgIlNBIl0"
"~WyJkVmEzX1JlTGNsWTU0R1FHZm5oWlRnIiwgInVwZGF0ZWRfYXQiLCAxNTcwMDAwMDAwXQ"
)
PATTERN = r"^[a-zA-Z0-9_-]+\.[a-zA-Z0-9_-]*\.[a-zA-Z0-9_-]+(?:~[a-zA-Z0-9_-]+)*~?$"
PATTERN = r"^[a-zA-Z0-9_-]+\.[a-zA-Z0-9_-]*\.[a-zA-Z0-9_-]+(?:~[a-zA-Z0-9._-]+)*~?$"

def __init__(self):
"""Initialize the instance."""
Expand Down
4 changes: 3 additions & 1 deletion aries_cloudagent/wallet/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1052,7 +1052,9 @@ async def wallet_jwt_verify(request: web.BaseRequest):


@docs(
tags=["wallet"], summary="Verify a EdDSA sd-jws using did keys with a given SD-JWS"
tags=["wallet"],
summary="Verify a EdDSA sd-jws using did keys with a given SD-JWS with "
"optional key binding",
)
@request_schema(SDJWSVerifySchema())
@response_schema(SDJWSVerifyResponseSchema(), 200, description="")
Expand Down

0 comments on commit 522a6c1

Please sign in to comment.