Question · NestJS course · Module 4: Authentication
@ApiBearerAuth decorator
What is the purpose of the @ApiBearerAuth('JWT-auth') decorator in NestJS?
Answer options
- Activates the JWT Guard on the endpoint
- Automatically generates a JWT token
- Documents in Swagger that the endpoint requires a Bearer token
- Encrypts the endpoint response
You can check the correct answer by solving this task in the CodeWorlds game.