Skip to content

Commit

Permalink
✅ Test[#10]: Swagger 인증 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
kduoh99 committed Nov 21, 2024
1 parent 2dcf07f commit 200efe8
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/main/java/com/groom/swipo/global/config/SwaggerConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,8 @@
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import io.swagger.v3.oas.models.Components;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Info;
import io.swagger.v3.oas.models.security.SecurityRequirement;
import io.swagger.v3.oas.models.security.SecurityScheme;
import io.swagger.v3.oas.models.servers.Server;

@Configuration
Expand All @@ -31,8 +28,6 @@ private Info apiInfo() {

@Bean
public OpenAPI openAPI() {
String authHeader = "Authorization";

Server localServer = new Server();
localServer.description("Local Server")
.url(localUrl);
Expand All @@ -43,13 +38,6 @@ public OpenAPI openAPI() {

return new OpenAPI()
.info(apiInfo())
.addSecurityItem(new SecurityRequirement().addList(authHeader))
.components(new Components()
.addSecuritySchemes(authHeader, new SecurityScheme()
.name(authHeader)
.type(SecurityScheme.Type.HTTP)
.scheme("Bearer")
.bearerFormat("accessToken")))
.servers(Arrays.asList(localServer, prodServer));
}
}

0 comments on commit 200efe8

Please sign in to comment.