Class SimpleTicketService
- java.lang.Object
-
- net.shibboleth.idp.cas.ticket.impl.AbstractTicketService
-
- net.shibboleth.idp.cas.ticket.impl.SimpleTicketService
-
- All Implemented Interfaces:
TicketService
public class SimpleTicketService extends AbstractTicketService
Simple CAS ticket management service that delegates storage toStorageService.
-
-
Constructor Summary
Constructors Constructor Description SimpleTicketService(StorageService service)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ProxyTicketcreateProxyTicket(String id, Instant expiry, ProxyGrantingTicket pgt, String service)Creates and stores a proxy ticket for the given service.ServiceTicketcreateServiceTicket(String id, Instant expiry, String service, TicketState state, boolean renew)Creates and stores a ticket for the given service.ProxyTicketremoveProxyTicket(String id)Removes the proxy ticket with the given identifier.ServiceTicketremoveServiceTicket(String id)Removes the service ticket with the given identifier.-
Methods inherited from class net.shibboleth.idp.cas.ticket.impl.AbstractTicketService
context, createProxyGrantingTicket, createProxyGrantingTicket, delete, fetchProxyGrantingTicket, read, removeProxyGrantingTicket, serializer, store
-
-
-
-
Constructor Detail
-
SimpleTicketService
public SimpleTicketService(@Nonnull @ParameterName(name="service") StorageService service)
Creates a new instance.- Parameters:
service- Storage service to which tickets are persisted.
-
-
Method Detail
-
createServiceTicket
@Nonnull public ServiceTicket createServiceTicket(@Nonnull String id, @Nonnull Instant expiry, @Nonnull String service, @Nullable TicketState state, boolean renew)
Creates and stores a ticket for the given service.- Parameters:
id- ID of ticket to create.expiry- Expiration date of service ticket.service- Service for which ticket is granted.state- Additional state to be stored with the ticket.renew- True to indicate the ticket was generated in response to a forced authentication, false otherwise.- Returns:
- Created service ticket.
-
removeServiceTicket
@Nullable public ServiceTicket removeServiceTicket(@Nonnull String id)
Removes the service ticket with the given identifier.- Parameters:
id- Identifier of ticket to remove.- Returns:
- Removed ticket or null if not found.
-
createProxyTicket
@Nonnull public ProxyTicket createProxyTicket(@Nonnull String id, @Nonnull Instant expiry, @Nonnull ProxyGrantingTicket pgt, @Nonnull String service)
Creates and stores a proxy ticket for the given service.- Parameters:
id- ID of proxy-granting ticket to create.expiry- Expiration date of proxy ticket.pgt- Proxy-granting ticket used to create proxy ticket.service- Service for which ticket is granted.- Returns:
- Created proxy ticket.
-
removeProxyTicket
@Nullable public ProxyTicket removeProxyTicket(@Nonnull String id)
Removes the proxy ticket with the given identifier.- Parameters:
id- Identifier of ticket to remove.- Returns:
- Removed ticket or null if not found.
-
-