Merge pull request #2976 from J-Cod3r/develop
[ISSUE #2956] simplify code
This commit is contained in:
commit
ab22fc7f3b
@ -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