Interface ClientExpirationEvaluator
public interface ClientExpirationEvaluator
Evaluates whether a client has breached its expiration limits.
This interface provides methods to check if a client is soon to expire or has already expired.
-
Method Summary
Modifier and TypeMethodDescriptionlongGets the default expiry duration for client credentials in seconds.booleanhasExpireLimitBreached(Client client) Checks if the client has breached its expiration limit.booleanhasSoonToExpireLimitBreached(Client client, Duration threshold) Checks if the client has breached its soon-to-expire limit.
-
Method Details
-
hasSoonToExpireLimitBreached
Checks if the client has breached its soon-to-expire limit. A client is considered soon to expire if it has not yet expired and its creation date plus its expiry duration minus a threshold is before the current time.- Parameters:
client- the client to evaluatethreshold- the duration threshold to consider for soon-to-expire- Returns:
- true if the client is soon to expire, false otherwise
-
hasExpireLimitBreached
Checks if the client has breached its expiration limit. A client is considered expired if its creation date plus its expiry duration is before the current time.- Parameters:
client- the client to evaluate- Returns:
- true if the client has expired, false otherwise
-
getDefaultClientCredentialExpiry
long getDefaultClientCredentialExpiry()Gets the default expiry duration for client credentials in seconds.- Returns:
- the default expiry duration in seconds
-