Package org.apache.wss4j.common.util
Class DateUtil
- java.lang.Object
-
- org.apache.wss4j.common.util.DateUtil
-
public final class DateUtil extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DateTimeFormatter
getDateTimeFormatter(boolean milliseconds)
static boolean
verifyCreated(Instant created, int timeToLive, int futureTimeToLive)
Return true if the "Created" value is before the current time minus the timeToLive argument, and if the Created value is not "in the future".
-
-
-
Method Detail
-
verifyCreated
public static boolean verifyCreated(Instant created, int timeToLive, int futureTimeToLive)
Return true if the "Created" value is before the current time minus the timeToLive argument, and if the Created value is not "in the future".- Parameters:
timeToLive
- the value in seconds for the validity of the Created timefutureTimeToLive
- the value in seconds for the future validity of the Created time- Returns:
- true if the Date is before (now-timeToLive), false otherwise
-
getDateTimeFormatter
public static DateTimeFormatter getDateTimeFormatter(boolean milliseconds)
-
-