Package net.shibboleth.idp.cas.ticket
Class Ticket
- java.lang.Object
-
- net.shibboleth.idp.cas.ticket.Ticket
-
- Direct Known Subclasses:
ProxyGrantingTicket,ProxyTicket,ServiceTicket
public class Ticket extends Object
Generic CAS ticket that has a natural identifier and expiration. All CAS tickets are bound to an IdP session ID that indicates the IdP session in which they were created.
-
-
Field Summary
Fields Modifier and Type Field Description private InstantexpirationInstantExpiration instant.private StringticketIdTicket identifier.private StringticketServiceService/relying party that requested the ticket.private TicketStateticketStateSupplemental ticket state data.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Ticketclone(String newId)Create a new ticket from this one with the given identifier.booleanequals(Object o)InstantgetExpirationInstant()Get the expiration instant.StringgetId()Get the ticket ID.StringgetService()Get the service that requested the ticket.StringgetSessionId()Get the session ID.TicketStategetTicketState()Get the supplemental ticket state data.inthashCode()protected TicketnewInstance(String newId)Create a new ticket with this ticket's service and expiration.voidsetTicketState(TicketState state)Set the supplemental ticket state data.StringtoString()
-
-
-
Field Detail
-
ticketId
@Nonnull private final String ticketId
Ticket identifier.
-
ticketService
@Nonnull private final String ticketService
Service/relying party that requested the ticket.
-
expirationInstant
@Nonnull private final Instant expirationInstant
Expiration instant.
-
ticketState
@Nullable private TicketState ticketState
Supplemental ticket state data.
-
-
Method Detail
-
getId
@Nonnull public String getId()
Get the ticket ID.- Returns:
- ticket ID
-
getSessionId
@Nullable public String getSessionId()
Get the session ID.- Returns:
- session ID
-
getService
@Nonnull public String getService()
Get the service that requested the ticket.- Returns:
- service that requested the ticket
-
getExpirationInstant
@Nonnull public Instant getExpirationInstant()
Get the expiration instant.- Returns:
- expiration instant
-
getTicketState
@Nullable public TicketState getTicketState()
Get the supplemental ticket state data.- Returns:
- ticket state
-
setTicketState
public void setTicketState(@Nullable TicketState state)Set the supplemental ticket state data.- Parameters:
state- supplemental ticket state
-
clone
public Ticket clone(@Nonnull String newId)
Create a new ticket from this one with the given identifier.- Parameters:
newId- New ticket ID.- Returns:
- Clone of this ticket with new ID.
-
-