question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add generality security decorator instead of @ApiBearerAuth() @ApiOAuth2Auth()

See original GitHub issue

I’m submitting a…


[ ] Regression 
[ ] Bug report
[x] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.

Current behavior

We are trying to migrate our old express & swagger application to Nest. The app have security parameter for own rule that is not bearer and oauth2. But there are only @ApiBearerAuth() @ApiOAuth2Auth().

Expected behavior

I guess we can use a generality security decorator. Example:

@ApiSecurity(securityDefinitionName)
@Get()
async findAll() {

Environment


Nest version: 5.3.7
@nestjs/swagger: 2.5.1

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
kamilmysliwieccommented, Dec 3, 2019

4.0.0 has been published

2reactions
nartccommented, Sep 22, 2018

@ktanakaj PR has been opened. Hopefully it gets reviewed and merged soon

Read more comments on GitHub >

github_iconTop Results From Across the Web

Security - OpenAPI | NestJS - A progressive Node.js ...
Security. To define which security mechanisms should be used for a specific operation, use the @ApiSecurity() decorator.
Read more >
How to globally apply Swagger UI's @ApiBearerAuth ...
I am working on a nestJS based api, and I am using Swagger UI documentation. I want keep the functionality of @ApiBearerAuth() for...
Read more >
How to use the @nestjs/swagger.ApiForbiddenResponse ...
To help you get started, we've selected a few @nestjs/swagger examples, based on popular ways it is used in public projects. Secure your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found