You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There could be multiple authentication headers, for example: api key and secret key. Both of those add something to the user object independently of each other.
It seems very strange to allow multiple returns from the Security tag, but then NOT merge the user object together.
You can build up a temp object and then use a middleware to set that to user. However that is not ideal as that temp object is going to get populated with variables from other @Security tags potentially leading to security vulnerabilities. So the best way is to do this inside of TSOA at the security group level.
The text was updated successfully, but these errors were encountered:
I want to echo issue #1637
There could be multiple authentication headers, for example: api key and secret key. Both of those add something to the user object independently of each other.
It seems very strange to allow multiple returns from the Security tag, but then NOT merge the user object together.
Solution
@daxadal identified the correct solution:
Workarounds
You can build up a temp object and then use a middleware to set that to
user
. However that is not ideal as that temp object is going to get populated with variables from other @Security tags potentially leading to security vulnerabilities. So the best way is to do this inside of TSOA at the security group level.The text was updated successfully, but these errors were encountered: