We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0cb8230 commit 04710dbCopy full SHA for 04710db
1 file changed
backend/src/main/java/com/example/ecommercewebservice/global/util/JwtTokenProvider.java
@@ -63,9 +63,8 @@ public JwtTokenProvider(
63
TokenRepository tokenRepository,
64
UserRepository userRepository) {
65
66
- // Base64로 인코딩된 시크릿 키를 디코딩하여 사용
67
- byte[] keyBytes = Decoders.BASE64.decode(secret);
68
- this.key = Keys.hmacShaKeyFor(keyBytes);
+ // HS512 알고리즘에 맞는 안전한 키 생성
+ this.key = Keys.secretKeyFor(SignatureAlgorithm.HS512);
69
this.tokenValidityInMilliseconds = tokenValidityInSeconds * 1000;
70
this.issuer = issuer;
71
this.tokenRepository = tokenRepository;
0 commit comments