src/main/java/com/property/manager/security/token/JwtTokenProvider.java
public String createToken(String username, Date createdAt) {
        Claims claims = Jwts.claims().setSubject(username);
        claims.put("createdAt", createdAt);
        claims.put("username", username);

        Date now = new Date();
        Date validity = new Date(now.getTime() + tokenExpireIn);

        return Jwts.builder()
                .setClaims(claims)
                .setIssuedAt(now)
                .setExpiration(validity)
                .signWith(SignatureAlgorithm.HS256, secretKey)
                .compact();
    }
/**
     * Builds compact URL-safe JWT string form username and createdAt
     *
     * @param username
     * @param createdAt
     * @return A compact URL-safe JWT string
     */
Builds compact URL-safe JWT string form username and createdAt
@param username
@param createdAt
@return A compact URL-safe JWT string
Builds compact URL - safe JWT string form username and createdAt @param username @param createdAt @return A compact URL - safe JWT string
public String createToken(String username, Date createdAt) {
        Claims claims = Jwts.claims().setSubject(username);
        claims.put("createdAt", createdAt);
        claims.put("username", username);
        Date now = new Date();
        Date validity = new Date(now.getTime() + tokenExpireIn);
        return Jwts.builder()
                .setClaims(claims)
                .setIssuedAt(now)
                .setExpiration(validity)
                .signWith(SignatureAlgorithm.HS256, secretKey)
                .compact();
    }
public String createToken ( String username , Date createdAt ) { Claims claims = Jwts . claims ( ) . setSubject ( username ) ; claims . put ( "createdAt" , createdAt ) ; claims . put ( "username" , username ) ; Date now = new Date ( ) ; Date validity = new Date ( now . getTime ( ) + tokenExpireIn ) ; return Jwts . builder ( ) . setClaims ( claims ) . setIssuedAt ( now ) . setExpiration ( validity ) . signWith ( SignatureAlgorithm . HS256 , secretKey ) . compact ( ) ; }
Builds compact URL-safe JWT string form username and createdAt
 @param username
 @param createdAt
 @return A compact URL-safe JWT string
Builds compact URL - safe JWT string form username and createdAt @param username @param createdAt @return A compact URL - safe JWT string