Skip to content

Commit

Permalink
Merge pull request #122 from beyond-sw-camp/feature/user/logout
Browse files Browse the repository at this point in the history
[Feat] 로그아웃 구현 #121
  • Loading branch information
Aqulog authored Aug 7, 2024
2 parents 786ccab + 3d61eb6 commit 0677035
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/main/java/com/gamja/tiggle/config/SecurityConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
"swagger/**", "auth/**").permitAll()
.anyRequest().authenticated()
);
http.logout((auth) -> auth.deleteCookies("AToken").logoutSuccessUrl("http://localhost:8081/"));

http.addFilterBefore(new JwtFilter(jwtUtil), LoginFilter.class);
http.addFilterAt(new LoginFilter(jwtUtil, authenticationManager(authenticationConfiguration)), UsernamePasswordAuthenticationFilter.class);
Expand Down Expand Up @@ -73,4 +74,6 @@ public AuthenticationManager authenticationManager(AuthenticationConfiguration c

return configuration.getAuthenticationManager();
}


}
3 changes: 0 additions & 3 deletions src/main/java/com/gamja/tiggle/config/filter/JwtFilter.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.gamja.tiggle.config.filter;

import com.gamja.tiggle.common.BaseException;
import com.gamja.tiggle.common.BaseResponse;
import com.gamja.tiggle.common.BaseResponseStatus;
import com.gamja.tiggle.user.domain.CustomUserDetails;
Expand Down Expand Up @@ -107,8 +106,6 @@ protected void doFilterInternal(HttpServletRequest request, HttpServletResponse


filterChain.doFilter(request, response);


}
}

0 comments on commit 0677035

Please sign in to comment.