Swagger UI "Authorize" button does not inject Bearer token in header (Spring Boot 4 + springdoc 3.1.1)

クローズ
#3,374 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 9 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
54/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
java, spring-boot

調査の方向性

Start with the @SecurityScheme configuration and the springdoc-openapi-starter-webmvc-ui 3.1.1 setup described in the issue; reproduce it with Spring Boot 4.0.x and inspect the request sent after authorizing. Done means the JWT is sent in the Authorization header on subsequent requests rather than stored only in a cookie.

索引モデルが issue の本文から書いたものです。

説明

Describe the bug

When using springdoc-openapi-starter-webmvc-ui version 3.1.1 with Spring Boot 4.0.x, the "Authorize" button in Swagger UI accepts the JWT token but does not inject it into the Authorization header on subsequent requests. Instead, the token is stored in a cookie, and no Authorization header is sent.

To Reproduce
  1. Configure @SecurityScheme with type HTTP, scheme bearer, bearerFormat JWT:
@Configuration
@OpenAPIDefinition(info = @Info(title = "API", version = "v1"))
@SecurityScheme(
    name = "bearerAuth",
    type = SecuritySchemeType.HTTP,
    scheme = "bearer",
    bearerFormat = "JWT"
)
public class OpenApiConfig {}
主要言語
Java
スター
3.7k
フォーク
605
平均マージ
9日 11時間
マージ済み PR(30日)
14

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

springdoc/springdoc-openapi のほかの issue

springdoc/springdoc-openapi の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。