Enforces a maximum lifespan for a password credential.
When
#afterAuthenticated(PasswordCredential,boolean)a password its expiration date is reached, its expired flag is set.
To ensure proper expiration handling, an empty (null) expiration date will be automatically
filled in when the credential is loaded from the persistent store using the
#PasswordExpirationInterceptor(int)
max lifespan in days.
When a password credential is
#beforeCreate(PasswordCredential)or a password is
#beforeSetPassword(PasswordCredential,String)a new future expiration date is calculated.
An existing or already provided higher expiration date will be preserved though.
This allows to (pre)set a (very) high expiration date for credentials which shouldn't expire.