From 00478575048f8f555786d8a707a99cf5c6a29b2a Mon Sep 17 00:00:00 2001 From: Juri Leino Date: Fri, 25 Jun 2021 14:35:57 +0200 Subject: [PATCH] fix(jwt): error expects xs:QName fixes #11 The error thrown when a token has an invalid signature is now given xs:QName. --- src/content/jwt.xqm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/jwt.xqm b/src/content/jwt.xqm index ef21a86..edffad1 100644 --- a/src/content/jwt.xqm +++ b/src/content/jwt.xqm @@ -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 {