Skip to content

Commit

Permalink
Feat: 로그아웃 코드 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
noeyoes authored Apr 5, 2024
2 parents 0e9488e + c2c0628 commit 2be6536
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.security.web.SecurityFilterChain;
import org.springframework.security.web.util.matcher.AntPathRequestMatcher;

@Configuration
@EnableWebSecurity
Expand Down Expand Up @@ -46,6 +47,7 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
configurer
.logoutUrl("/api/logout")
.deleteCookies("JSESSIONID")
.logoutRequestMatcher(new AntPathRequestMatcher("/logout"))
)

//인증되지 않은 자원에 접근했을 때
Expand Down

0 comments on commit 2be6536

Please sign in to comment.