all repos — litestore @ 90c2b69e40d3dd68acb0c3fa80d9e1161b40c47c

A minimalist nosql document store.

Fixes.
h3rald h3rald@h3rald.com
Fri, 29 Dec 2023 22:56:59 +0100
commit

90c2b69e40d3dd68acb0c3fa80d9e1161b40c47c

parent

5e505a3610fc3e929947bee825e58b56bb10e7d9

1 files changed, 2 insertions(+), 2 deletions(-)

jump to
M src/litestorepkg/lib/jwt.nimsrc/litestorepkg/lib/jwt.nim

@@ -29,8 +29,8 @@ raise newException(ValueError, "JWKS file not found: " & file)

let keys = file.readFile.parseJson["keys"] if token.header.hasKey("kid"): let kid = token.header["kid"].getStr - return keys.filterIt(it["kid"].getStr == kid)[0]["x5c"].getStr - return keys[0]["x5c"].getStr + return keys.filterIt(it["kid"].getStr == kid)[0]["x5c"][0].getStr + return keys[0]["x5c"][0].getStr proc base64UrlDecode(encoded: string): string = let padding = 4 - (encoded.len mod 4)