simplify code
This commit is contained in:
parent
8423e33dd0
commit
bf74511a82
@ -57,7 +57,7 @@ public class JwtTokenManager {
|
|||||||
|
|
||||||
public String createToken(String userName) {
|
public String createToken(String userName) {
|
||||||
|
|
||||||
long now = (new Date()).getTime();
|
long now = System.currentTimeMillis();
|
||||||
|
|
||||||
Date validity;
|
Date validity;
|
||||||
validity = new Date(now + authConfigs.getTokenValidityInSeconds() * 1000L);
|
validity = new Date(now + authConfigs.getTokenValidityInSeconds() * 1000L);
|
||||||
|
@ -104,7 +104,7 @@ public class JwtTokenUtils {
|
|||||||
/**
|
/**
|
||||||
* Current time
|
* Current time
|
||||||
*/
|
*/
|
||||||
long now = (new Date()).getTime();
|
long now = System.currentTimeMillis();
|
||||||
/**
|
/**
|
||||||
* Validity date
|
* Validity date
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user