code: public static boolean validateToken(String authToken, UserDetails userDetails) {
          String[] parts = authToken.split(TOKEN_SEPARATOR);
          long expires = Long.parseLong(parts[1]);
          String signature = parts[2];
  
          return expires >= System.currentTimeMillis() && signature.equals(TokenUtils.computeSignature(userDetails, expires));
      }
docs: Validates the token signature against the user details and the current system time.
  
  @param authToken   authorization token.
  @param userDetails user details.
  @return true if token is not expired and is equal to computed signature on base of user details.