Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

auth #141

Open
K4leri opened this issue Aug 10, 2024 · 1 comment
Open

auth #141

K4leri opened this issue Aug 10, 2024 · 1 comment

Comments

@K4leri
Copy link

K4leri commented Aug 10, 2024

Dont find possible ways to protect swagger

doesnt work

  .guard(app => 
    app
    .use(isAuthenticated)
    .get("/swagger/json", redirect("/swagger/json"))
    .get("/swagger", redirect("/swagger"))
  )
  .use(swagger())

isAuthenticated here is plugin with checking auth credentials.

What can be done ? =>
The fastest way to impement mannual auth

.use(swagger({
   authToken: "token_1234"
})

The user must manually enter a token in the browser, which will be used in the request headers

@MaximoArceci
Copy link

I have the same problem, I want the endpoints in swagger to appear as protected but I can't do it. The documentation does not show examples

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants