[x] used the search to make sure that a similar issue hasn't already been submit
Expected Behavior
I want to specify security tags on my controller methods but I don't want to do the authentication via the auto-generated Tsoa routes file.
Current Behavior
Not specifying the authenticationModule in the config throws an error when trying to hit the endpoint because of the missing expressAuthentication middleware.
I could provide a no-op function here but it has some undesired behavior, specifically re-setting the user field on the request object.
Sorting
I'm submitting a ...
I confirm that I
Expected Behavior
I want to specify security tags on my controller methods but I don't want to do the authentication via the auto-generated Tsoa routes file.
Current Behavior
Not specifying the
authenticationModule
in the config throws an error when trying to hit the endpoint because of the missingexpressAuthentication
middleware.I could provide a no-op function here but it has some undesired behavior, specifically re-setting the
user
field on therequest
object.https://github.com/lukeautry/tsoa/blame/ac87a3b04ae2156fcd7b17eace4787bbd68c16be/packages/cli/src/routeGeneration/templates/express.hbs#L171
Possible Solution
This line: https://github.com/lukeautry/tsoa/blob/ac87a3b04ae2156fcd7b17eace4787bbd68c16be/packages/cli/src/routeGeneration/routeGenerator.ts#L146
Should also check if authenticationModule is present