From 083f6e33a13a81241df22c1e036808b94fb70b78 Mon Sep 17 00:00:00 2001 From: yumzen Date: Thu, 8 Aug 2024 23:31:37 +0900 Subject: [PATCH] =?UTF-8?q?Chore:=20swagger=20token=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/codiary/backend/global/config/SwaggerConfig.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/codiary/backend/global/config/SwaggerConfig.java b/src/main/java/com/codiary/backend/global/config/SwaggerConfig.java index 2d9c011a..7f7c3a53 100644 --- a/src/main/java/com/codiary/backend/global/config/SwaggerConfig.java +++ b/src/main/java/com/codiary/backend/global/config/SwaggerConfig.java @@ -21,10 +21,11 @@ public OpenAPI CodiaryAPI() { String jwtSchemeName = "JWT TOKEN"; SecurityRequirement securityRequirement = new SecurityRequirement().addList(jwtSchemeName); Components components = new Components() - .addSecuritySchemes("accessToken", new SecurityScheme() + .addSecuritySchemes("JWT TOKEN", new SecurityScheme() .name("Authorization") - .type(SecurityScheme.Type.APIKEY) // HTTP 방식 + .type(SecurityScheme.Type.HTTP) // HTTP 방식 .in(SecurityScheme.In.HEADER) + .scheme("bearer") .bearerFormat("JWT") ); @@ -33,7 +34,7 @@ public OpenAPI CodiaryAPI() { .info(info) .addSecurityItem(securityRequirement) .components(components); - //.components(new Components()) - //.addSecurityItem(securityRequirement) + //.components(new Components()) + //.addSecurityItem(securityRequirement) } }