Interface TicketService

All Known Implementing Classes:
AbstractTicketService, EncodingTicketService, SimpleTicketService

public interface TicketService
CAS ticket management service.
  • 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

      @Nullable 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.
    • 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 of ProxyTicket.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

      @Nullable ProxyGrantingTicket fetchProxyGrantingTicket(@Nonnull String id)
      Retrieves a proxy-granting ticket by its ID.
      Parameters:
      id - Proxy-granting ticket ID.
      Returns:
      Proxy-granting ticket or null if not found.
    • removeProxyGrantingTicket

      @Nullable ProxyGrantingTicket removeProxyGrantingTicket(@Nonnull String id)
      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

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