code: public boolean validateToken(final String token) {
          try {
              final JwtParser jwtParser = Jwts.parser().setSigningKey(key);
              jwtParser.parse(token);
              this.subject = jwtParser.parseClaimsJws(token).getBody().getSubject();
              this.expiration = jwtParser.parseClaimsJws(token).getBody().getExpiration();
              return true;
          } catch (SignatureException e) {
              LOGGER.info(SecurityMarkers.SECURITY_FAILURE, "Received token that did not pass signature verification");
          } catch (ExpiredJwtException e) {
              LOGGER.debug(SecurityMarkers.SECURITY_FAILURE, "Received expired token");
          } catch (MalformedJwtException e) {
              LOGGER.debug(SecurityMarkers.SECURITY_FAILURE, "Received malformed token");
              LOGGER.debug(SecurityMarkers.SECURITY_FAILURE, e.getMessage());
          } catch (UnsupportedJwtException | IllegalArgumentException e) {
              LOGGER.error(SecurityMarkers.SECURITY_FAILURE, e.getMessage());
          }
          return false;
      }
docs: Validates a JWT by ensuring the signature matches and validates
  against the SecretKey and checks the expiration date.
  
  @param token the token to validate
  @return true if validation successful, false if not
  @since 1.0.0