org.apereo.cas.ticket.artifact.SamlArtifactTicketExpirationPolicyBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cas-server-support-saml-idp-ticket Show documentation
Show all versions of cas-server-support-saml-idp-ticket Show documentation
cas-server-support-saml-idp-ticket
package org.apereo.cas.ticket.artifact;
import org.apereo.cas.configuration.CasConfigurationProperties;
import org.apereo.cas.ticket.ExpirationPolicy;
import org.apereo.cas.ticket.ExpirationPolicyBuilder;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.ToString;
/**
* This is {@link SamlArtifactTicketExpirationPolicyBuilder}.
*
* @author Misagh Moayyed
* @since 6.1.0
*/
@RequiredArgsConstructor
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS)
@ToString
@Getter
public class SamlArtifactTicketExpirationPolicyBuilder implements ExpirationPolicyBuilder {
private static final long serialVersionUID = -3597980180617072826L;
/**
* The Cas properties.
*/
protected final CasConfigurationProperties casProperties;
@Override
public ExpirationPolicy buildTicketExpirationPolicy() {
return toTicketExpirationPolicy();
}
@Override
public Class getTicketType() {
return SamlArtifactTicket.class;
}
/**
* To ticket expiration policy.
*
* @return the expiration policy
*/
public ExpirationPolicy toTicketExpirationPolicy() {
return new SamlArtifactTicketExpirationPolicy(casProperties.getTicket().getSt().getTimeToKillInSeconds());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy