Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] Swagger Post 권한 추가 #363

Merged
merged 2 commits into from
Sep 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import lombok.RequiredArgsConstructor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.HttpMethod;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.http.SessionCreationPolicy;
Expand All @@ -28,15 +29,16 @@ public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Excepti
.and()

.authorizeRequests()
.antMatchers(HttpMethod.POST).authenticated()
.antMatchers("/oauths/**").permitAll()
.antMatchers("/swagger-ui/**", "/swagger-resources/**", "/v3/api-docs/**").permitAll()
.anyRequest().authenticated()
.and()

.sessionManagement()
.sessionCreationPolicy(SessionCreationPolicy.STATELESS)
.and()
.apply(filterConfig);
.and()
.apply(filterConfig);

return http.build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public Tests isTestinProgress(Member member){
extracted(test);

if (test.getRemainingTime() > 0) { // 시간이 남았을경우 진행중인 테스트 반환
return test;//getTestStartResponseDto(currentTestId, test);
return test; //getTestStartResponseDto(currentTestId, test);
}
else { // 시간이 마감된 테스트 종료
TestType testType = testTypeRepository.findTestTypeByTestTypename(test.getTestTypename())
Expand Down