Package net.shibboleth.idp.cas.ticket
Interface TicketService
- All Known Implementing Classes:
AbstractTicketService
,EncodingTicketService
,SimpleTicketService
public interface TicketService
CAS ticket management service.
-
Method Summary
Modifier and TypeMethodDescriptioncreateProxyGrantingTicket
(String id, Instant expiry, ProxyTicket proxyTicket) Creates a chained proxy-granting ticket from a proxy ticket.createProxyGrantingTicket
(String id, Instant expiry, ServiceTicket serviceTicket) Creates a top-level proxy-granting ticket from a service ticket.createProxyTicket
(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.Retrieves a proxy-granting ticket by its ID.Removes the proxy-granting ticket with the given identifier.Removes the proxy ticket with the given identifier.Removes the service ticket with the given identifier.
-
Method Details
-
createServiceTicket
@Nonnull ServiceTicket createServiceTicket(@Nonnull String id, @Nonnull Instant expiry, @Nonnull String service, @Nonnull 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.state
- Additional state to be stored with the ticket.service
- Service for which ticket is granted.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.
-
createProxyGrantingTicket
@Nonnull ProxyGrantingTicket createProxyGrantingTicket(@Nonnull String id, @Nonnull Instant expiry, @Nonnull ServiceTicket serviceTicket) Creates a top-level proxy-granting ticket from a service ticket.- Parameters:
id
- ID of proxy-granting ticket to create.expiry
- Expiration date of proxy-granting ticket.serviceTicket
- Successfully-validated service ticket.- Returns:
- Created proxy-granting ticket.
-
createProxyGrantingTicket
@Nonnull ProxyGrantingTicket createProxyGrantingTicket(@Nonnull String id, @Nonnull Instant expiry, @Nonnull ProxyTicket proxyTicket) Creates a chained proxy-granting ticket from a proxy ticket. The value ofProxyTicket.getPgtId()
defines the parent of the created ticket, which in turn determines its location in the proxy chain.- Parameters:
id
- ID of proxy-granting ticket to create.expiry
- Expiration date of proxy-granting ticket.proxyTicket
- Successfully-validated proxy ticket.- Returns:
- Created proxy-granting ticket.
-
fetchProxyGrantingTicket
Retrieves a proxy-granting ticket by its ID.- Parameters:
id
- Proxy-granting ticket ID.- Returns:
- Proxy-granting ticket or null if not found.
-
removeProxyGrantingTicket
Removes the proxy-granting ticket with the given identifier.- Parameters:
id
- Identifier of ticket to remove.- Returns:
- Removed ticket or null if not found.
-
createProxyTicket
@Nonnull 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.
-