Hi everyone. I'm having problems with swagger documentation for API
endpoints which have the @PreAuthorize annotation (we use spring framework
and OAuth2 for authorization). When I click "Try it out!" I get a 403
response (forbidden). I was trying to use the @Authorization and
@AuthorizationScope annotations but without any luck.
Can I perform the authorization somehow or at least is there a way to
detect that an endpoint needs authorization so that I can mark that
endpoint in the documentation?
This is how I used the annotations:
@ApiOperation(value = "Value", authorizations = { @Authorization("ADMIN") })
@PreAuthorize("isAuthenticated()")
...but the response was the same.
--
You received this message because you are subscribed to the Google Groups
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.