This page is a place to evolve a CAS 3 domain model for tickets.
Ticket
public Interface Ticket { /** * Get the Date at which this Ticket was created. */ public Date getTimestamp(); /** * Returns true if this ticekt as valid, false otherwise. */ public boolean isValid(); }
TicketGrantingTicket
public Interface TicketGrantingTicket extends Ticket { /** * Get the Principal which owns this TicketGrantingTicket and may exercise it * to obtain a TargettedTicket for authentication to a particular URL. * For instance, in the case of a SSOTicket this Principal is the end user who authenticated * to CAS by presentation of Primary Credentials. * In the case of a ProxyGrantingTicket, this is the URL to which the PGT was vended. */ public Principal getPrincipal(); /** * Derive from this TicketGrantingTicket a TargettedTicket for use in authenticating * to some particular target. */ public TargettedTicket deriveTicket(URL target); }
SSOTicket
public Class SSOTicket implements TicketGrantingTicket { private final Date whenCreated = new Date(); private final Principal authenticatedUser; private final ExpirationPolicy expPolicy; public SSOTicket(Principal authenticatedUser, public ExpirationPolicy expPolicy) { this.authenticatedUser = authenticatedUser; this.expPolicy = expPolicy; } public Principal getUser() { return this.authenticatedUser; } public boolean isValid() { return this.expPolicy.isValid(); } public void expire() { this.expPolicy.expire(); } }
DerivedTicket
public Interface DerivedTicket extends Ticket { /** * Get the TicketGrantingTicket from which this ticket was derived. */ public TicketGrantingTicket getParent(); }
TargettedTicket
public Interface TargettedTicket extends DerivedTicket { /** * Get the URL to which this ticket will authenticate. */ public URL getTarget(); /** * Get the chain of principals through which authentication has passed * in producing this targetted ticket, starting with the most recent principal * and leading back to the originally authenticating User. */ public List getPrincipalChain(); }