use of org.apereo.cas.ticket.expiration.SurrogateSessionExpirationPolicy in project cas by apereo.
the class SurrogateAuthenticationExpirationPolicyBuilder method toTicketExpirationPolicy.
/**
* To ticket expiration policy.
*
* @return the expiration policy
*/
public ExpirationPolicy toTicketExpirationPolicy() {
val su = casProperties.getAuthn().getSurrogate();
val surrogatePolicy = new HardTimeoutExpirationPolicy(su.getTgt().getTimeToKillInSeconds());
val policy = new SurrogateSessionExpirationPolicy();
policy.addPolicy(SurrogateSessionExpirationPolicy.POLICY_NAME_SURROGATE, surrogatePolicy);
policy.addPolicy(SurrogateSessionExpirationPolicy.POLICY_NAME_DEFAULT, ticketGrantingTicketExpirationPolicyBuilder.buildTicketExpirationPolicy());
return policy;
}
Aggregations