我正在尝试添加OAuth 2受保护的API。 问题是我无法弄清楚如何从摇摇欲坠的UI设置OAuth 2的授权来测试API(试用)。我将Java与Jersey一起使用。 感谢您的宝贵时间。
@SwaggerDefinition(securityDefinition =
@SecurityDefinition(oAuth2Definitions = {
@OAuth2Definition(
key = "testoauth",
description = "MES OAuth",
authorizationUrl = "url",
tokenUrl = "tokenUrl",
scopes = {
@Scope(
name = "test",
description = "testscope"
),
@Scope(
name = "general:save",
description = "save operation"
),
@Scope(
name = "general:update",
description = "update operation"
)
},
flow = OAuth2Definition.Flow.IMPLICIT
)
})
)