Im currently working with Quarkus and Swagger-UI as delivered by quarkus-smallrye-openapi. We have OIDC from Azure AD as security, which is currently not supported by Swagger-UI (see Swagger-Docs ), so I can't add the "real" authorization to swagger. This means, I can't use Swagger since my endpoints are at least secured with @RolesAllowed
. We have an endpoint to fetch a mock-security token, but I don't know how to tell swagger to take this token. Basically I want to tell swagger-ui "Here, I have this token, add it as Authorization: Bearer XXX
to all requests", but I don't know how to do that in Quarkus.
@Path("/sample")
@SecuritySchemes(value = {
@SecurityScheme(securitySchemeName = "apiKey",
type = SecuritySchemeType.HTTP,
scheme = "Bearer")}
)
public class SampleResource {
@GET
@SecurityRequirement(name = "apiKey")
String hello() {
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.