I'm currently trying to implement passport-ldap and passport-jwt to my rest API. For routing I use pleerock/routing-controllers, which has a way for authorization, but it works with booleans and passport works with I honestly don't know. I'm not even sure if its possible to combine the two.
Currently AuthorizationChecker returns false because I don't know how to make passport.authenticate into a boolean.
useExpressServer(app, {
controllers: [UserController, IssueController, LoginController],
authorizationChecker: async (action: Action) => {
return false;
}
@Authorized()
@Get("/test")
test(@Res() response: Response){
response.send("Test done.")
}
How to use passport.authenticate() with routing-controlls authorization?