Skip to content

Commit

Permalink
refact: token refresh logic
Browse files Browse the repository at this point in the history
  • Loading branch information
windeer9 committed Oct 26, 2023
1 parent d7612d5 commit 4f419d8
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,9 @@ public void commence(HttpServletRequest request, HttpServletResponse response,
AuthenticationException authenticationException) throws IOException{
Exception exception = (Exception) request.getAttribute("exception");


String base64EncodedSecretKey = jwtTokenizer.encodeBase64SecretKey(jwtTokenizer.getSecretKey());
if(request.getHeader("Authorization") != null && !request.getHeader("Authorization").isEmpty()) {
String jws = request.getHeader("Authorization").replace("Bearer ", "");
String base64EncodedSecretKey = jwtTokenizer.encodeBase64SecretKey(jwtTokenizer.getSecretKey());
if (isAccessTokenExpired(request)) {
if (request.getHeader("Refresh") != null && !request.getHeader("Refresh").isEmpty()) {
if (isRefreshTokenExpired(request)) {
Expand Down

0 comments on commit 4f419d8

Please sign in to comment.