Skip to content

Commit

Permalink
[Fix] :: code style fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lgwk42 committed May 9, 2024
1 parent cb70cef commit 56e007b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
public class JwtProperties {

private String secretKey;

private long expiration;

private long refreshExpiration;

}
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.project.qvick.global.security.jwt.enums;

public enum JwtType {

ACCESS, REFRESH;

}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ public class JwtAuthenticationFilter extends OncePerRequestFilter {
@Override
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
throws ServletException, IOException, ExpiredJwtException {

String token = jwtExtractor.extractTokenFromRequest(request);
if (token != null) {
SecurityContextHolder.getContext().setAuthentication(jwtExtractor.getAuthentication(token));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,15 @@
public class JwtExceptionFilter extends OncePerRequestFilter {

@Override
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws IOException {

protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
throws IOException {
try {
filterChain.doFilter(request, response);
} catch (IllegalArgumentException e) {
setErrorResponse(HttpStatus.UNAUTHORIZED, response, e);
} catch (ServletException e) {
setErrorResponse(HttpStatus.BAD_REQUEST, response, e);
}

}

public void setErrorResponse(HttpStatus status, HttpServletResponse response, Throwable ex) throws IOException {
Expand Down

0 comments on commit 56e007b

Please sign in to comment.