Interface TicketGrantingTicket

    • Field Detail

      • PREFIX

        static final java.lang.String PREFIX
        The prefix to use when generating an id for a Ticket Granting Ticket.
        See Also:
        Constant Field Values
    • Method Detail

      • trackService

        void trackService​(java.lang.String id,
                          org.apereo.cas.authentication.principal.Service service,
                          boolean onlyTrackMostRecentSession)
        Update service and track session.
        Parameters:
        id - the id
        service - the service
        onlyTrackMostRecentSession - the only track most recent session
      • grantServiceTicket

        ServiceTicket grantServiceTicket​(java.lang.String id,
                                         org.apereo.cas.authentication.principal.Service service,
                                         ExpirationPolicy expirationPolicy,
                                         boolean credentialProvided,
                                         boolean onlyTrackMostRecentSession)
        Grant a ServiceTicket for a specific service.
        Parameters:
        id - The unique identifier for this ticket.
        service - The service for which we are granting a ticket
        expirationPolicy - the expiration policy.
        credentialProvided - current credential event for issuing this ticket. Could be null.
        onlyTrackMostRecentSession - track the most recent session by keeping the latest service ticket
        Returns:
        the service ticket granted to a specific service for the principal of the TicketGrantingTicket
      • getServices

        java.util.Map<java.lang.String,​org.apereo.cas.authentication.principal.Service> getServices()
        Gets an immutable map of service ticket and services accessed by this ticket-granting ticket.
        Returns:
        an immutable map of service ticket and services accessed by this ticket-granting ticket.
      • getProxyGrantingTickets

        java.util.Map<java.lang.String,​org.apereo.cas.authentication.principal.Service> getProxyGrantingTickets()
        Gets proxy granting tickets created by this TGT.
        Returns:
        the proxy granting tickets
      • removeAllServices

        void removeAllServices()
        Remove all services of the TGT (at logout).
      • isRoot

        boolean isRoot()
        Convenience method to determine if the TicketGrantingTicket is the root of the hierarchy of tickets.
        Returns:
        true if it has no parent, false otherwise.
      • getRoot

        TicketGrantingTicket getRoot()
        Gets the ticket-granting ticket at the root of the ticket hierarchy.
        Returns:
        Non -null root ticket-granting ticket.
      • getChainedAuthentications

        java.util.List<org.apereo.cas.authentication.Authentication> getChainedAuthentications()
        Gets all authentications (AuthenticationAwareTicket.getAuthentication() from this instance and all dependent tickets that reference this one.
        Returns:
        Non -null list of authentication associated with this ticket in leaf-first order.
      • getProxiedBy

        org.apereo.cas.authentication.principal.Service getProxiedBy()
        Gets the service that produced a proxy-granting ticket.
        Returns:
        Service that produced proxy-granting ticket or null if this is not a proxy-granting ticket.
        Since:
        4.1
      • getDescendantTickets

        default java.util.Collection<java.lang.String> getDescendantTickets()
        Gets descendant tickets. These are generally ticket ids whose life-line is separate from the TGT until and unless the TGT goes away entirely. Things such as OAuth access tokens are a good example of such linked tickets.
        Returns:
        the descendant tickets
        Since:
        5.1