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

feat : JWT 예외 API 추가 #243

Closed
wants to merge 1 commit into from
Closed
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 @@ -23,7 +23,9 @@
@Slf4j
public class JWTFilter extends OncePerRequestFilter {
private final JWTUtil jwtUtil;
private final List<String> permitAllUrls = List.of("/api/user/login", "/api/user/signUp", "/", "/api/user/reissue", "/api/user/cookieToJwt");

private final List<String> permitAllUrls = List.of("/api/user/login", "/api/user/signUp", "/", "/api/user/reissue",
"/api/user/cookieToJwt","/user/uniqueEmail/**","/user/uniqueNickname/**","/swagger-ui.html","/api/user/organization/invitation/accept");
@Override
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException {
String requestURI = request.getRequestURI();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ public CorsConfiguration getCorsConfiguration(HttpServletRequest request) {
// 경로별 인가 작업
http
.authorizeHttpRequests((auth -> auth
.requestMatchers("/api/user/login","/","/api/user/signUp").permitAll()
.requestMatchers("/api/user/login","/","/api/user/signUp","/api/user/organization/invitation/accept").permitAll()
.requestMatchers("/admin").hasRole("ADMIN")
.requestMatchers("/api/user/reissue","/api/user/cookieToJwt").permitAll()
.requestMatchers("/api/user/reissue","/api/user/cookieToJwt","/user/uniqueEmail/**","/user/uniqueNickname/**","/swagger-ui.html","/user/reissue").permitAll()
.anyRequest().authenticated())
);
http.addFilterAfter(new JWTFilter(jwtUtil), OAuth2LoginAuthenticationFilter.class);
Expand Down
Loading