Closed karlmoad closed 7 years ago
Hmm. I think the swaggerize-routes
need a publish with my PR for this - https://github.com/krakenjs/swaggerize-routes/pull/68. Looks like the change went in sometime ago, but the module never got published.
@tlivings - Can you publish a new version Or give me ({ name: "subeeshcbabu", email: "subeeshcbabu@yahoo.co.in" }) the publish privileges ?
@karlmoad, published swaggerize-routes@1.0.9
. Can you upgrade and try ?
Upgraded to swaggerize-routes 1.0.9 problem remains
Did you add the security: Path.resolve('./security')
option for defining the base directory to look for security/auth handlers?
https://github.com/krakenjs/swaggerize-routes#security-directory
https://github.com/karlmoad/test-api/blob/master/server.js#L20 <- Here you need to specify the security
option and set the path to security handlers directory.
Apologies, after adding the security option to the app setup the function is being called correctly
Nice 👏 . Great to know it worked.
Utilized swaggerize generator to initialize project from a pre-defined yaml spec. Authorization handler is not being called for applicable routes.
in security/token.js
Problem token.js authorize code is never executed, attempted x-authorize specified implementation as well same result:
401 Unauthorized response is returned
code available at following repo
[https://github.com/karlmoad/test-api]