class JwtCookieMiddleware (View source)

Middleware that authenticates users using a JWT stored in a cookie.

Validates the token, authenticates the user, and attaches the user to the current request. Redirects or returns 401 on failure.

Methods

handle(Request $request, Closure $next)

Handle an incoming request.

Details

handle(Request $request, Closure $next)

Handle an incoming request.

Parameters

Request $request

the current HTTP request

Closure $next

the next middleware or request handler