Skip to content

Commit

Permalink
fix(jwt): error expects xs:QName
Browse files Browse the repository at this point in the history
fixes #11

The error thrown when a token has an invalid signature is
now given xs:QName.
  • Loading branch information
line-o committed Jun 25, 2021
1 parent d6c4ade commit 0047857
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/content/jwt.xqm
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ declare function jwt:read ($token as xs:string, $secret as xs:string, $lifetime
then (error(xs:QName("future-date"), $dt, jwt:epoch-to-dateTime($payload?iat)))
else ($payload)
)
else (error("invalid-signature"))
else (error(xs:QName("invalid-signature")))
};

declare function jwt:sign ($data as xs:string, $secret as xs:string) as xs:string {
Expand Down

0 comments on commit 0047857

Please sign in to comment.