Interface TicketRegistrySupport


  • public interface TicketRegistrySupport
    Helper strategy API to ease retrieving CAS' Authentication object and its associated components from available CAS SSO String token called Ticket Granting Ticket (TGT).
    Since:
    4.2.0
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String BEAN_NAME
      Default bean name.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      org.apereo.cas.authentication.principal.Principal getAuthenticatedPrincipalFrom​(java.lang.String ticketGrantingTicketId)
      Retrieve a valid Principal object identified by the provided TGT SSO token.
      org.apereo.cas.authentication.Authentication getAuthenticationFrom​(java.lang.String ticketGrantingTicketId)
      Retrieve a valid Authentication object identified by the provided TGT SSO token.
      java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> getPrincipalAttributesFrom​(java.lang.String ticketGrantingTicketId)
      Retrieve a valid Principal's map of attributes identified by the provided TGT SSO token.
      TicketGrantingTicket getTicketGrantingTicket​(java.lang.String ticketGrantingTicketId)
      Retrieve a valid tgt object identified by the provided TGT SSO token.
      TicketState getTicketState​(java.lang.String ticketId)
      Retrieve a valid ticket object identified by the provided the id and transform it into a ticket state.
      void updateAuthentication​(java.lang.String ticketGrantingTicketId, org.apereo.cas.authentication.Authentication authentication)
      Update authentication associated with the ticket-granting ticket and restore changes back to the registry; particularly updated authentication attributes, etc.
    • Field Detail

    • Method Detail

      • getAuthenticationFrom

        org.apereo.cas.authentication.Authentication getAuthenticationFrom​(java.lang.String ticketGrantingTicketId)
        Retrieve a valid Authentication object identified by the provided TGT SSO token.
        Parameters:
        ticketGrantingTicketId - an SSO token identifying the requested Authentication
        Returns:
        valid Authentication OR NULL if there is no valid SSO session present identified by the provided TGT id SSO token
      • getTicketGrantingTicket

        TicketGrantingTicket getTicketGrantingTicket​(java.lang.String ticketGrantingTicketId)
        Retrieve a valid tgt object identified by the provided TGT SSO token.
        Parameters:
        ticketGrantingTicketId - an SSO token identifying the requested Authentication
        Returns:
        valid TGT OR NULL if there is no valid SSO session present identified by the provided TGT id SSO token
      • getTicketState

        TicketState getTicketState​(java.lang.String ticketId)
        Retrieve a valid ticket object identified by the provided the id and transform it into a ticket state.
        Parameters:
        ticketId - the ticket id
        Returns:
        the ticket state
      • getAuthenticatedPrincipalFrom

        org.apereo.cas.authentication.principal.Principal getAuthenticatedPrincipalFrom​(java.lang.String ticketGrantingTicketId)
        Retrieve a valid Principal object identified by the provided TGT SSO token.
        Parameters:
        ticketGrantingTicketId - an SSO token identifying the requested authenticated Principal
        Returns:
        valid Principal OR NULL if there is no valid SSO session present identified by the provided TGT id SSO token
      • getPrincipalAttributesFrom

        java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> getPrincipalAttributesFrom​(java.lang.String ticketGrantingTicketId)
        Retrieve a valid Principal's map of attributes identified by the provided TGT SSO token.
        Parameters:
        ticketGrantingTicketId - an SSO token identifying the requested authenticated Principal's attributes
        Returns:
        valid Principal's attributes OR NULL if there is no valid SSO session present identified by the provided TGT id SSO token
      • updateAuthentication

        void updateAuthentication​(java.lang.String ticketGrantingTicketId,
                                  org.apereo.cas.authentication.Authentication authentication)
                           throws java.lang.Exception
        Update authentication associated with the ticket-granting ticket and restore changes back to the registry; particularly updated authentication attributes, etc.
        Parameters:
        ticketGrantingTicketId - the ticket granting ticket id
        authentication - the authentication
        Throws:
        java.lang.Exception - the exception