Jwt token factory refactored due to PE
This commit is contained in:
parent
3bd8ec4468
commit
39a9cefb9d
@ -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);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user