Search in sources :

Example 1 with SurrogateSessionExpirationPolicy

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;
}
Also used : lombok.val(lombok.val) HardTimeoutExpirationPolicy(org.apereo.cas.ticket.expiration.HardTimeoutExpirationPolicy) SurrogateSessionExpirationPolicy(org.apereo.cas.ticket.expiration.SurrogateSessionExpirationPolicy)

Aggregations

lombok.val (lombok.val)1 HardTimeoutExpirationPolicy (org.apereo.cas.ticket.expiration.HardTimeoutExpirationPolicy)1 SurrogateSessionExpirationPolicy (org.apereo.cas.ticket.expiration.SurrogateSessionExpirationPolicy)1