Package net.shibboleth.idp.cas.ticket
Class Ticket
java.lang.Object
net.shibboleth.idp.cas.ticket.Ticket
- Direct Known Subclasses:
ProxyGrantingTicket
,ProxyTicket
,ServiceTicket
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
FieldsModifier and TypeFieldDescriptionprivate final Instant
Expiration instant.private final String
Ticket identifier.private final String
Service/relying party that requested the ticket.private TicketState
Supplemental ticket state data. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreate a new ticket from this one with the given identifier.boolean
Get the expiration instant.getId()
Get the ticket ID.Get the service that requested the ticket.Get the session ID.Get the supplemental ticket state data.int
hashCode()
protected Ticket
newInstance
(String newId) Create a new ticket with this ticket's service and expiration.void
setTicketState
(TicketState state) Set the supplemental ticket state data.toString()
-
Field Details
-
ticketId
Ticket identifier. -
ticketService
Service/relying party that requested the ticket. -
expirationInstant
Expiration instant. -
ticketState
Supplemental ticket state data.
-
-
Constructor Details
-
Ticket
Creates a new ticket with the given parameters.- Parameters:
id
- Ticket ID.service
- Service that requested the ticket.expiration
- Expiration instant.
-
-
Method Details
-
getId
Get the ticket ID.- Returns:
- ticket ID
-
getSessionId
Get the session ID.- Returns:
- session ID
-
getService
Get the service that requested the ticket.- Returns:
- service that requested the ticket
-
getExpirationInstant
Get the expiration instant.- Returns:
- expiration instant
-
getTicketState
Get the supplemental ticket state data.- Returns:
- ticket state
-
setTicketState
Set the supplemental ticket state data.- Parameters:
state
- supplemental ticket state
-
equals
-
hashCode
public int hashCode() -
toString
-
clone
Create a new ticket from this one with the given identifier.- Parameters:
newId
- New ticket ID.- Returns:
- Clone of this ticket with new ID.
-
newInstance
Create a new ticket with this ticket's service and expiration.- Parameters:
newId
- new ticket ID- Returns:
- newly created ticket
-