我在micronaut应用程序中使用swagger open api 3,授权+pkce流程如下
@SecurityScheme(name = "Open Id Connect",
type = SecuritySchemeType.OAUTH2,
scheme = "bearer",
bearerFormat = "jwt",
flows = @OAuthFlows(
authorizationCode = @OAuthFlow(
authorizationUrl = "https://dev-6271510.okta.com/oauth2/default/v1/authorize",
tokenUrl = "https://dev-6271510.okta.com/oauth2/default/v1/token",
refreshUrl = "",
extensions ={@Extension(name = "client_id",properties = {@ExtensionProperty(name = "client_id", value = "ssssss")})},
scopes = {@OAuthScope(name = "openid", description= "Open Id scope"),
@OAuthScope(name = "profile", description= "Name scope"),
@OAuthScope(name = "email" , description= "Email scope")}
))
)
客户端id和客户端密钥没有Map,我不知道如何Map,目前我正在手动放置。
当openid重定向到身份提供者时,我能够成功地执行身份验证。
现在,当身份提供者重定向回micronaut swagger ui时,重定向uri是 http://localhost:8084/oauth2-redirect.html
在micronaut swagger 中找不到,我也不能称之为终点,因为它不包含 access_token
我觉得小矮人应该有个uri https://localhost:8084/swagger/oauth2-redirect.html
身份提供者应该重定向到此url。
暂无答案!
目前还没有任何答案,快来回答吧!