the problem I want to solve is to protect an API route so only allowed servers with a token can access it.
I added the Sanctum package and included the auth:sanctum
middleware in the route definition. That route is entered even when the request includes an invalid token.
How to make the middleware stop processing when the token is invalid and send a HTTP 401 response.
The Laravel application only provides an API, no frontend. It's only used by other servers we controlss, not from browsers.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community