* Get a ConditionsBean object.
*/
public ConditionsBean getConditions(TokenProviderParameters providerParameters) {
ConditionsBean conditions = new ConditionsBean();
if (lifetime > 0) {
Lifetime tokenLifetime = providerParameters.getTokenRequirements().getLifetime();
if (acceptClientLifetime && tokenLifetime != null
&& tokenLifetime.getCreated() != null && tokenLifetime.getExpires() != null) {
try {
XmlSchemaDateFormat fmt = new XmlSchemaDateFormat();
Date creationTime = fmt.parse(tokenLifetime.getCreated());
Date expirationTime = fmt.parse(tokenLifetime.getExpires());
// Check to see if the created time is in the future
Date validCreation = new Date();
long currentTime = validCreation.getTime();
if (futureTimeToLive > 0) {