Package net.shibboleth.idp.cas.ticket

# Class ServiceTicket

java.lang.Object
net.shibboleth.idp.cas.ticket.Ticket
net.shibboleth.idp.cas.ticket.ServiceTicket

public class ServiceTicket extends Ticket
CAS service ticket.

## Field Summary

Fields
Modifier and Type
Field
Description
`private final boolean`
`forceAuthn`
Forced authentication flag.

## Constructor Summary

Constructors
Constructor
Description
`ServiceTicket(String id, String service, Instant expiration, boolean renew)`
Creates a new authenticated ticket with an identifier, service, and expiration date.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`isRenew()`
Get whether ticket was issued from forced authentication.
`protected Ticket`
`newInstance(String newId)`
Create a new ticket with this ticket's service and expiration.

### Methods inherited from class net.shibboleth.idp.cas.ticket.Ticket

`clone, equals, getExpirationInstant, getId, getService, getSessionId, getTicketState, hashCode, setTicketState, toString`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

## Field Details

### forceAuthn

private final boolean forceAuthn
Forced authentication flag.

## Constructor Details

### ServiceTicket

public ServiceTicket(@Nonnull String id, @Nonnull String service, @Nonnull Instant expiration, boolean renew)
Creates a new authenticated ticket with an identifier, service, and expiration date.

Parameters:
  `id` - Ticket ID.
  `service` - Service that requested the ticket.
  `expiration` - Expiration instant.
  `renew` - True if ticket was issued from forced authentication, false otherwise.

## Method Details

### isRenew

public boolean isRenew()
Get whether ticket was issued from forced authentication.

Returns:
  true if ticket was issued from forced authentication, false otherwise

### newInstance

protected Ticket newInstance(@Nonnull String newId)
Create a new ticket with this ticket's service and expiration.

Overrides:
  `newInstance` in class `Ticket`
Parameters:
  `newId` - new ticket ID
Returns:
  newly created ticket