Package net.shibboleth.idp.cas.protocol

# Class ServiceTicketResponse

java.lang.Object
net.shibboleth.idp.cas.protocol.ServiceTicketResponse

Direct Known Subclasses:
  `TicketValidationRequest`

public class ServiceTicketResponse extends Object
CAS protocol response message for a successfully granted service ticket.

## Field Summary

Fields
Modifier and Type
Field
Description
`private boolean`
`saml`
Flag indicating whether ticket request is via SAML 1.1 protocol.
`private final String`
`serviceTicket`
Granted service ticket.
`private final String`
`serviceURL`
Service URL.

## Constructor Summary

Constructors
Constructor
Description
`ServiceTicketResponse(String service, String ticket)`
Creates a CAS service ticket response message for a service and granted ticket.

## Method Summary

Modifier and Type
Method
Description
`String`
`getRedirectUrl()`
Get the URL that may be used to redirect to a service with a granted ticket.
`String`
`getService()`
Get the service that requested the ticket.
`String`
`getTicket()`
Get the ticket issued to the service.
`String`
`getTicketParameterName()`
Get the name of the ticket parameter returned to the requesting service.
`boolean`
`isSaml()`
Get whether ticket request is via SAML 1.1 protocol.
`void`
`setSaml(boolean flag)`
Set whether ticket request is via SAML 1.1 protocol.

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

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### serviceURL

@Nonnull private final String serviceURL
Service URL.

### serviceTicket

@Nonnull private final String serviceTicket
Granted service ticket.

### saml

private boolean saml
Flag indicating whether ticket request is via SAML 1.1 protocol.

## Constructor Details

### ServiceTicketResponse

public ServiceTicketResponse(@Nonnull String service, @Nonnull String ticket)
Creates a CAS service ticket response message for a service and granted ticket.

Parameters:
  `service` - Service that requested ticket.
  `ticket` - Granted service ticket.

## Method Details

### getService

@Nonnull public String getService()
Get the service that requested the ticket.

Returns:
  service that requested the ticket

### getTicket

@Nonnull public String getTicket()
Get the ticket issued to the service.

Returns:
  the ticket issued to the service

### isSaml

public boolean isSaml()
Get whether ticket request is via SAML 1.1 protocol.

Returns:
  whether ticket request is via SAML 1.1 protocol

### setSaml

public void setSaml(boolean flag)
Set whether ticket request is via SAML 1.1 protocol.

Parameters:
  `flag` - flag to set

### getTicketParameterName

@Nonnull public String getTicketParameterName()
Get the name of the ticket parameter returned to the requesting service.

Returns:
  the name of the ticket parameter returned to the requesting service

### getRedirectUrl

@Nonnull public String getRedirectUrl()
Get the URL that may be used to redirect to a service with a granted ticket.

Returns:
  URL that may be used to redirect to a service with a granted ticket