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 to StorageService.
  • Constructor Details

    • SimpleTicketService

      public SimpleTicketService​(@Nonnull @ParameterName(name="service") StorageService service)
      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

      @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.