From 02feaf087efbc409f2335c4e84fd37e658df16e6 Mon Sep 17 00:00:00 2001 From: Taimoor Zaeem Date: Fri, 20 Feb 2026 13:05:39 +0500 Subject: [PATCH] refactor: remove commented out code from Auth/Jwt.hs Some commented out code got left in the codebase in 5196823365c92156816183f02a0fad582bb98850. Signed-off-by: Taimoor Zaeem --- src/PostgREST/Auth/Jwt.hs | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/PostgREST/Auth/Jwt.hs b/src/PostgREST/Auth/Jwt.hs index 88a91a9e5..1da448dc0 100644 --- a/src/PostgREST/Auth/Jwt.hs +++ b/src/PostgREST/Auth/Jwt.hs @@ -92,13 +92,10 @@ checkForErrors time audMatches = mconcat parseToken :: (MonadError Error m, MonadIO m) => JwkSet -> ByteString -> m JWT.JwtContent parseToken _ "" = throwError $ JwtErr $ JwtDecodeErr EmptyAuthHeader parseToken secret tkn = do - -- secret <- liftEither . maybeToRight (JwtErr JwtSecretMissing) $ configJWKS tknWith3Parts <- hasThreeParts tkn eitherContent <- liftIO $ JWT.decode (JWT.keys secret) Nothing tknWith3Parts liftEither . mapLeft (JwtErr . jwtDecodeError) $ eitherContent - --liftEither $ mapLeft JwtErr $ verifyClaims content where - --hasThreeParts :: ByteString -> Either Error ByteString hasThreeParts token = case length $ BS.split (BS.c2w '.') token of 3 -> pure token n -> throwError $ JwtErr $ JwtDecodeErr $ UnexpectedParts n