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

Declare Auth schema without need to implement handlers #1615

Closed
3 of 4 tasks
mishelen opened this issue Apr 19, 2024 · 2 comments
Closed
3 of 4 tasks

Declare Auth schema without need to implement handlers #1615

mishelen opened this issue Apr 19, 2024 · 2 comments
Labels

Comments

@mishelen
Copy link

mishelen commented Apr 19, 2024

Sorting

  • I'm submitting a question or possibly feature request.

    • bug report
    • feature request
    • support request
  • I confirm that I

    • used the search to make sure that a similar issue hasn't already been submit

Expected Behavior

Suppose I have tsoa.json:

  "spec": {
    "outputDirectory": "src",
    "specVersion": 3,
    "securityDefinitions": {
      "AuthorizationHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization"
      }
    }
  },

So I want to add authorization. But problem is in fact that it will currently not applied to any of endpoints when making swagger requests. To add it, I need to specify "rootSecurity": [{ "AuthorizationHeader": []}] and then provide AuthorizationModule, while authorization is done externally via lambda auth.

Question is how to provide authorization schema and apply globally without need to implement it?

Context (Environment)

Version of the library: 6.2.0
Version of NodeJS: 20.12.2

Copy link

Hello there mishelen 👋

Thank you for opening your very first issue in this project.

We will try to get back to you as soon as we can.👀

Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days

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

No branches or pull requests

1 participant