use of org.apereo.cas.ticket.support.SurrogateSessionExpirationPolicy in project cas by apereo.
the class SurrogateAuthenticationConfiguration method grantingTicketExpirationPolicy.
@Bean
public ExpirationPolicy grantingTicketExpirationPolicy(@Qualifier("ticketGrantingTicketExpirationPolicy") final ExpirationPolicy ticketGrantingTicketExpirationPolicy) {
final SurrogateAuthenticationProperties su = casProperties.getAuthn().getSurrogate();
final HardTimeoutExpirationPolicy surrogatePolicy = new HardTimeoutExpirationPolicy(su.getTgt().getTimeToKillInSeconds());
final SurrogateSessionExpirationPolicy policy = new SurrogateSessionExpirationPolicy(surrogatePolicy);
policy.addPolicy(SurrogateSessionExpirationPolicy.PolicyTypes.SURROGATE, surrogatePolicy);
policy.addPolicy(SurrogateSessionExpirationPolicy.PolicyTypes.DEFAULT, ticketGrantingTicketExpirationPolicy);
return policy;
}
Aggregations