Class SimpleTicketService
java.lang.Object
net.shibboleth.idp.cas.ticket.impl.AbstractTicketService
net.shibboleth.idp.cas.ticket.impl.SimpleTicketService
- All Implemented Interfaces:
TicketService
Simple CAS ticket management service that delegates storage to
StorageService
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateProxyTicket
(String id, Instant expiry, ProxyGrantingTicket pgt, String service) Creates and stores a proxy ticket for the given service.createServiceTicket
(String id, Instant expiry, String service, TicketState state, boolean renew) Creates and stores a ticket for the given service.Removes the proxy ticket with the given identifier.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 Details
-
SimpleTicketService
Creates a new instance.- Parameters:
service
- Storage service to which tickets are persisted.
-
-
Method Details
-
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
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
Removes the proxy ticket with the given identifier.- Parameters:
id
- Identifier of ticket to remove.- Returns:
- Removed ticket or null if not found.
-