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 Instant
expirationInstant
Expiration instant.private String
ticketId
Ticket identifier.private String
ticketService
Service/relying party that requested the ticket.private TicketState
ticketState
Supplemental ticket state data. -
Constructor Summary
-
Method Summary
Modifier and Type Method Description Ticket
clone(String newId)
Create a new ticket from this one with the given identifier.boolean
equals(Object o)
Instant
getExpirationInstant()
Get the expiration instant.String
getId()
Get the ticket ID.String
getService()
Get the service that requested the ticket.String
getSessionId()
Get the session ID.TicketState
getTicketState()
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.String
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
-