如何在隐式 Oauth2 流的授权 URL 中将 response_type 更改为 id_token

问题描述

我有以下 OpenAPI 配置

   new OpenAPI()
                .components(
                        new Components()
                                .addSecuritySchemes("oAuthScheme",new SecurityScheme()
                                        .type(SecurityScheme.Type.OAUTH2)
                                        .description("This API uses OAuth 2 with the implicit grant flow.")
                                        .flows(new OAuthFlows()
                                                .implicit(new OAuthFlow()
                                                        .authorizationUrl("http://example.com/oauth2/default/v1/authorize")
                                                        .scopes(new Scopes()
                                                                .addString("openid","read user @R_665_4045@ion")
                                                        )

                                                )
                                        )
                                )
                )

当我点击 swagger UI 上的授权按钮时,它会生成以下 URL

http://example.com/oauth2/default/v1/authorize?nonce=nonce&response_type=token&client_id=client-id&redirect_uri=http%3A%2F%2Flocalhost%3A8080%2Fswagger-ui%2Foauth2-redirect.html&scope=openid&state=U2F0IEphbiAwMiAyMDIxID

我想要 response_type 作为 id_token 代替令牌。有什么办法可以改变这种情况吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)