Skip to content

Commit 02feaf0

Browse files
taimoorzaeemsteve-chavez
authored andcommitted
refactor: remove commented out code from Auth/Jwt.hs
Some commented out code got left in the codebase in 5196823. Signed-off-by: Taimoor Zaeem <taimoorzaeem@gmail.com>
1 parent c52fd3f commit 02feaf0

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

src/PostgREST/Auth/Jwt.hs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,10 @@ checkForErrors time audMatches = mconcat
9292
parseToken :: (MonadError Error m, MonadIO m) => JwkSet -> ByteString -> m JWT.JwtContent
9393
parseToken _ "" = throwError $ JwtErr $ JwtDecodeErr EmptyAuthHeader
9494
parseToken secret tkn = do
95-
-- secret <- liftEither . maybeToRight (JwtErr JwtSecretMissing) $ configJWKS
9695
tknWith3Parts <- hasThreeParts tkn
9796
eitherContent <- liftIO $ JWT.decode (JWT.keys secret) Nothing tknWith3Parts
9897
liftEither . mapLeft (JwtErr . jwtDecodeError) $ eitherContent
99-
--liftEither $ mapLeft JwtErr $ verifyClaims content
10098
where
101-
--hasThreeParts :: ByteString -> Either Error ByteString
10299
hasThreeParts token = case length $ BS.split (BS.c2w '.') token of
103100
3 -> pure token
104101
n -> throwError $ JwtErr $ JwtDecodeErr $ UnexpectedParts n

0 commit comments

Comments
 (0)