Rename folder for clarity

This commit is contained in:
Mike Conrad
2025-06-20 19:59:32 -04:00
parent b6c684cdd1
commit 03e9317041
64 changed files with 8 additions and 9 deletions

View File

@ -0,0 +1,19 @@
import type { HttpContext } from '@adonisjs/core/http'
import type { NextFn } from '@adonisjs/core/types/http'
/**
* Silent auth middleware can be used as a global middleware to silent check
* if the user is logged-in or not.
*
* The request continues as usual, even when the user is not logged-in.
*/
export default class SilentAuthMiddleware {
async handle(
ctx: HttpContext,
next: NextFn,
) {
await ctx.auth.check()
return next()
}
}