Class JwtValidations

java.lang.Object
energy.eddie.regionconnector.shared.jwt.JwtValidations

public final class JwtValidations extends Object
  • Method Details

    • isValidUntil

      public static boolean isValidUntil(String jwt, LocalDate date)
      Validates a JWT based on its expiration date. If the JWT is not at least valid until date returns false, otherwise true
      Parameters:
      jwt - the JWT
      date - the minimum end date of the JWT
      Returns:
      if the JWT is valid until date
    • isValidUntil

      public static boolean isValidUntil(String jwt, ZonedDateTime zonedDateTime)
      Validates a JWT based on its expiration date. If the JWT is not at least valid until zonedDateTime returns false, otherwise true
      Parameters:
      jwt - the JWT
      zonedDateTime - the minimum end datetime of the JWT
      Returns:
      if the JWT is valid until zonedDateTime