code: public static String createToken(UserDetails userDetails) {
          long expires = System.currentTimeMillis() + TOKEN_VALIDITY_DURATION;
  
          return userDetails.getUsername() + TOKEN_SEPARATOR + expires + TOKEN_SEPARATOR + TokenUtils.computeSignature(userDetails, expires);
      }
docs: Creates a token based on {@code UserDetails}, the current time and TOKEN_VALIDITY_DURATION.
  
  @param userDetails user details.
  @return token.