Merge pull request #10758 from YevhenBondarenko/fix/jjwt-generate-report

Jwt token factory refactored due to PE
This commit is contained in:
Viacheslav Klimov 2024-05-10 14:10:21 +03:00 committed by GitHub
commit 42f5fe662e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -210,11 +210,12 @@ public class JwtTokenFactory {
ZonedDateTime currentTime = ZonedDateTime.now();
claimsBuilder.expiration(Date.from(currentTime.plusSeconds(expirationTime).toInstant()));
return Jwts.builder()
.claims(claimsBuilder.build())
.issuer(jwtSettingsService.getJwtSettings().getTokenIssuer())
.issuedAt(Date.from(currentTime.toInstant()))
.expiration(Date.from(currentTime.plusSeconds(expirationTime).toInstant()))
.signWith(getSecretKey(false), Jwts.SIG.HS512);
}