* Get a ConditionsBean object.
*/
public ConditionsBean getConditions(TokenProviderParameters providerParameters) {
ConditionsBean conditions = new ConditionsBean();
Lifetime tokenLifetime = providerParameters.getTokenRequirements().getLifetime();
if (lifetime > 0) {
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());
if (creationTime == null || expirationTime == null) {
LOG.fine("Error in parsing Timestamp Created or Expiration Strings");
throw new STSException(
"Error in parsing Timestamp Created or Expiration Strings",
STSException.INVALID_TIME