Class JwtValidations
java.lang.Object
energy.eddie.regionconnector.shared.jwt.JwtValidations
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisValidUntil(String jwt, LocalDate date) Validates a JWT based on its expiration date.static booleanisValidUntil(String jwt, ZonedDateTime zonedDateTime) Validates a JWT based on its expiration date.
-
Method Details
-
isValidUntil
Validates a JWT based on its expiration date. If the JWT is not at least valid untildatereturns false, otherwise true- Parameters:
jwt- the JWTdate- the minimum end date of the JWT- Returns:
- if the JWT is valid until
date
-
isValidUntil
Validates a JWT based on its expiration date. If the JWT is not at least valid untilzonedDateTimereturns false, otherwise true- Parameters:
jwt- the JWTzonedDateTime- the minimum end datetime of the JWT- Returns:
- if the JWT is valid until
zonedDateTime
-