Skip to content

Commit

Permalink
[JT-65] hotfix: 회원 등록/로그인 경로 필터 무시 및 경로 변경
Browse files Browse the repository at this point in the history
[JT-65] hotfix: 회원 등록/로그인 경로 필터 무시 및 경로 변경
  • Loading branch information
hongdosan authored Sep 12, 2023
2 parents 31841c7 + 5bac0b8 commit 390aade
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/jtoon-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
run: |
VERSION=$(grep -o -E "v[0-9]+\.[0-9]+\.[0-9]+" <<< "${{ github.event.head_commit.message }}")
echo "VERSION=${VERSION}" >> $GITHUB_ENV
- name: Github release 자동생성
uses: action-pack/github-release@v2
env:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class MemberController {

private final MemberService memberService;

@PostMapping
@PostMapping("/sign-up")
@ResponseStatus(HttpStatus.CREATED)
public void signUp(@RequestBody @Valid SignUpReq signUpReq) {
memberService.createMember(signUpReq);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityCustomizer;
import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer;
import org.springframework.security.config.http.SessionCreationPolicy;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
Expand All @@ -17,12 +18,13 @@
import com.devtoon.jtoon.security.filter.JwtAuthenticationFilter;
import com.devtoon.jtoon.security.handler.OAuth2FailureHandler;
import com.devtoon.jtoon.security.handler.OAuth2SuccessHandler;

import lombok.RequiredArgsConstructor;

@Configuration
@RequiredArgsConstructor
@EnableWebSecurity
public class WebSecurityConfiguration {
public class SecurityConfig {

private final HandlerExceptionResolver handlerExceptionResolver;
private final JwtService jwtService;
Expand All @@ -35,6 +37,13 @@ public PasswordEncoder encoder() {
return new BCryptPasswordEncoder();
}

@Bean
public WebSecurityCustomizer webSecurityCustomizer() {
return web -> web.ignoring()
.requestMatchers("/members/sign-up")
.requestMatchers("/login");
}

@Bean
public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
http
Expand Down

0 comments on commit 390aade

Please sign in to comment.