File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -92,13 +92,10 @@ checkForErrors time audMatches = mconcat
9292parseToken :: (MonadError Error m , MonadIO m ) => JwkSet -> ByteString -> m JWT. JwtContent
9393parseToken _ " " = throwError $ JwtErr $ JwtDecodeErr EmptyAuthHeader
9494parseToken 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
You can’t perform that action at this time.
0 commit comments