if (tokenParameters.getRealm() != null) {
props.setProperty(STSConstants.TOKEN_REALM, tokenParameters.getRealm());
}
// Handle Renewing logic
Renewing renewing = tokenParameters.getTokenRequirements().getRenewing();
if (renewing != null) {
props.put(
STSConstants.TOKEN_RENEWING_ALLOW,
String.valueOf(renewing.isAllowRenewing())
);
props.put(
STSConstants.TOKEN_RENEWING_ALLOW_AFTER_EXPIRY,
String.valueOf(renewing.isAllowRenewingAfterExpiry())
);
} else {
props.setProperty(STSConstants.TOKEN_RENEWING_ALLOW, "true");
props.setProperty(STSConstants.TOKEN_RENEWING_ALLOW_AFTER_EXPIRY, "false");
}