Skip to content

Commit

Permalink
feat : JWT 예외 API 추가
Browse files Browse the repository at this point in the history
1.이메일 중복 확인 API
2.닉네임 중복 확인 API
3.Swagger 진입
4.초대 수락
  • Loading branch information
Doncham committed Jun 11, 2024
1 parent 1ebaa61 commit c1182ea
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
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

0 comments on commit c1182ea

Please sign in to comment.