Skip to content

Commit

Permalink
fix: Update JwtTokenService.java call env
Browse files Browse the repository at this point in the history
  • Loading branch information
Lunawood authored Dec 20, 2024
1 parent d9886c5 commit a881c74
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,14 @@
import com.auth0.jwt.algorithms.Algorithm;
import com.auth0.jwt.interfaces.DecodedJWT;

import io.github.cdimascio.dotenv.Dotenv;
import lombok.extern.slf4j.Slf4j;

@Slf4j
@Service
public class JwtTokenService {
Dotenv dotenv = Dotenv.configure().load();

private String secret = dotenv.get("JWT_SECRET_KEY");
private String secret = System.getenv("JWT_SECRET_KEY");

private int accessTokenExpMinutes = 1728000 * 1000; // 10분

Expand Down Expand Up @@ -129,4 +128,4 @@ public Long extractIdFromAccessToken(String token) throws Exception {
String idString = jwt.getSubject();
return Long.parseLong(idString);
}
}
}

0 comments on commit a881c74

Please sign in to comment.