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
After your update, 2.2.0, if someone is using your boilerplate project, it will stop working because there is an incompatibility with typescript-rest-swagger and multiple authenticators. I've added the stack trace in this other bug #91. Can you please update the documentation with a relevant example on how to use the securityDefinitions in swagger.config.json and the Swagger UI with Bearer Authorization?
This produces the following Swagger UI authorization:
However, when I try any request in Swagger UI, the Authorization Header is not added: curl -X GET "http://localhost:8080/users/1/accounts?includeExpired=true" -H "accept: application/json"
I then updated to 2.2.0 and tried to add Server.registerAuthenticator(new MyCustomTokenAuth(), 'MyAuth'); and on my controller, I use @Security('ROLE_USER', 'MyAuth') but it seems that typescript-rest-swagger refuses to generate the swagger file with the following error:
Hi. I see the update but this doesn't answer the Swagger UI Authorization question. Does it work with the new version 2.2.0 or not yet? And if it's supposed to work, can you include an example? This is a very common use case. Also, there's a comment that the update is actually breaking.
Uh oh!
There was an error while loading. Please reload this page.
After your update, 2.2.0, if someone is using your boilerplate project, it will stop working because there is an incompatibility with
typescript-rest-swagger
and multiple authenticators. I've added the stack trace in this other bug #91. Can you please update the documentation with a relevant example on how to use thesecurityDefinitions
inswagger.config.json
and the Swagger UI withBearer Authorization
?I have this in
swagger.config.json
:This produces the following Swagger UI authorization:
However, when I try any request in Swagger UI, the Authorization Header is not added:
curl -X GET "http://localhost:8080/users/1/accounts?includeExpired=true" -H "accept: application/json"
I then updated to 2.2.0 and tried to add
Server.registerAuthenticator(new MyCustomTokenAuth(), 'MyAuth')
; and on my controller, I use@Security('ROLE_USER', 'MyAuth')
but it seems thattypescript-rest-swagger
refuses to generate the swagger file with the following error:Could you update your boilerplate example and the documentation to provide a clear example on how to achieve this? Thanks.
The text was updated successfully, but these errors were encountered: