Class ExpirationUtils

java.lang.Object
org.keycloak.models.map.common.ExpirationUtils

public class ExpirationUtils extends Object
  • Constructor Details

    • ExpirationUtils

      public ExpirationUtils()
  • Method Details

    • isExpired

      public static boolean isExpired(ExpirableEntity entity, boolean allowInfiniteValues)
      Checks whether the entity is expired
      Parameters:
      entity - to check
      allowInfiniteValues - sets how null values are interpreted, if true entity with expiration equal to null is interpreted as never expiring entity, if false entities with null expiration are interpreted as expired entities
      Returns:
      true if the entity is expired (expiration time is in the past or now), false otherwise
    • isNotExpired

      public static boolean isNotExpired(Object entity)