Decide whether a request is allowed to reach your controller before the actual business logic runs.
Guards are designed to decide whether a request should continue through the NestJS request pipeline. They are commonly used for authentication and authorization, such as checking whether a user is logged in or has permission to access a resource.
Guards can access information about the current execution context, including the incoming request and the route being accessed. This makes them a good fit for decisions about whether a request should be allowed to proceed.
What you'll walk away knowing