Skip to content

Commit

Permalink
fix: explicit error for invalid signature
Browse files Browse the repository at this point in the history
  • Loading branch information
line-o committed Nov 8, 2020
1 parent e3e4add commit 55fa986
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion content/jwt.xqm
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,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())
else (error("invalid-signature"))
};

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

0 comments on commit 55fa986

Please sign in to comment.