[x] used the search to make sure that a similar issue hasn't already been submit
Expected Behavior
I would like to introduce a possibility to get the retorn of the @Security Decorator as a parameter to the Function. In the same way we could add a standard way to read a property out of the Request, this could be usefull for variables set in a Middleware function.
In this way the parameters could have also typings.
Example for the Security docu:
import { Get, Route, Security, Response } from "tsoa";
@Route("secure")
export class SecureController {
@Response<ErrorResponseModel>("Unexpected error")
@Security("api_key")
@Get("UserInfo")
public async userInfo(@Request("user") user: UserResponseModel): Promise<UserResponseModel> {
return Promise.resolve(user);
}
}
Sorting
I'm submitting a ...
I confirm that I
Expected Behavior
I would like to introduce a possibility to get the retorn of the @Security Decorator as a parameter to the Function. In the same way we could add a standard way to read a property out of the Request, this could be usefull for variables set in a Middleware function. In this way the parameters could have also typings.
Example for the Security docu: