Class SigningKeyRetention
java.lang.Object
com.irurueta.authserver.authorization.application.keys.SigningKeyRetention
Decides how long a retired signing key stays published. A key must be published for as long as any token it signed
can still be presented, so the effective retention is the longest of the configured retention and the longest
signed-token lifetime plus the allowed clock skew. The signed tokens are the access and ID tokens of the
registered clients (reported by the
SignedTokenLifetimes port) and the e-mail verification tokens.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final DurationClock skew tolerated by the token consumers (authserver.keys.clock-skew, default 60 seconds).private final DurationMinimum retention (authserver.keys.retention, default 2 hours).private final SignedTokenLifetimesPort that reports the lifetimes of the tokens the clients obtain. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
signedTokenLifetimes
Port that reports the lifetimes of the tokens the clients obtain. -
configuredRetention
Minimum retention (authserver.keys.retention, default 2 hours). -
clockSkew
Clock skew tolerated by the token consumers (authserver.keys.clock-skew, default 60 seconds).
-
-
Constructor Details
-
SigningKeyRetention
public SigningKeyRetention()
-
-
Method Details
-
effective
Computes the effective retention at this moment: registering a client with longer-lived tokens lengthens it.- Returns:
- the longest of the configured retention and the longest signed-token lifetime plus the clock skew.
-