{"version":3,"file":"soft-authenticate.mjs","names":[],"sources":["../../../../src/libs/http/middleware/soft-authenticate.ts"],"sourcesContent":["import { createMiddleware } from \"hono/factory\";\nimport type { LucidHonoContext } from \"../../../types/hono.js\";\nimport { authenticationCheck } from \"./authenticate.js\";\n\n/**\n * Checks if the user is authenticated and stores the authentication data in the context.\n *\n * If the user is not authenticated, it will not throw an error and will continue with the request.\n */\nconst softAuthenticate = createMiddleware(async (c: LucidHonoContext, next) => {\n\tawait authenticationCheck(c, { soft: true });\n\treturn await next();\n});\n\nexport default softAuthenticate;\n"],"mappings":"yGASA,MAAM,EAAmB,EAAiB,MAAO,EAAqB,KACrE,MAAM,EAAoB,EAAG,CAAE,KAAM,EAAK,CAAC,EACpC,MAAM,EAAK,EAClB"}