Package net.shibboleth.idp.cas.session.impl

# Class CASSPSession

java.lang.Object
net.shibboleth.idp.session.BasicSPSession
net.shibboleth.idp.cas.session.impl.CASSPSession

All Implemented Interfaces:
  `SPSession`, `Component`, `IdentifiedComponent`

public class CASSPSession extends BasicSPSession
Describes a CAS protocol-specific service provider session created in response to a successful ticket validation.

## Field Summary

Fields
Modifier and Type
Field
Description
`private final String`
`serviceURL`
Full service URL.
`private final String`
`ticket`
Validated ticket that started the SP session.

## Constructor Summary

Constructors
Constructor
Description
`CASSPSession(String id, Instant creation, Instant expiration, String ticketId, String url)`
Creates a new CAS SP session.

## Method Summary

Modifier and Type
Method
Description
`String`
`getProtocol()`
Get a protocol constant for the session suitable for metadata lookup.
`String`
`getServiceURL()`
Get the service URL.
`String`
`getSPSessionKey()`
Get a unique key identifying this subject's session with the service.
`String`
`getTicketId()`
Get the ticket ID.
`boolean`
`supportsLogoutPropagation()`
Gets whether the session allows for logout propagation.
`String`
`toString()`

### Methods inherited from class net.shibboleth.idp.session.BasicSPSession

`equals, getCreationInstant, getExpirationInstant, getId, hashCode`

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

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

## Field Details

### ticket

@Nonnull @NotEmpty private final String ticket
Validated ticket that started the SP session.

### serviceURL

@Nonnull @NotEmpty private final String serviceURL
Full service URL.

## Constructor Details

### CASSPSession

public CASSPSession(@Nonnull @NotEmpty String id, @Nonnull Instant creation, @Nonnull Instant expiration, @Nonnull @NotEmpty String ticketId, @Nonnull @NotEmpty String url)
Creates a new CAS SP session.

Parameters:
  `id` - the identifier of the service associated with this session
  `creation` - creation time of session
  `expiration` - expiration time of session
  `ticketId` - ticket ID used to gain access to the service
  `url` - full URL of service, as distinct from the possibly shortened ID

## Method Details

### getTicketId

@Nonnull @NotEmpty public String getTicketId()
Get the ticket ID.

Returns:
  ticket ID

### getServiceURL

@Nonnull @NotEmpty public String getServiceURL()
Get the service URL.

Returns:
  service URL
Since:
  5.0.0

### getSPSessionKey

@Nullable public String getSPSessionKey()
Get a unique key identifying this subject's session with the service.

This will vary based on the type of session, typically based on the protocol used, but it provides a secondary lookup key that may be required in support of other use cases involving that protocol. Not all protocols may require such a key, so null may be returned.

Specified by:
  `getSPSessionKey` in interface `SPSession`
Overrides:
  `getSPSessionKey` in class `BasicSPSession`
Returns:
  a unique key identifying this subject's session with the service, or null

### getProtocol

@Nullable @NotEmpty public String getProtocol()
Get a protocol constant for the session suitable for metadata lookup.

Specified by:
  `getProtocol` in interface `SPSession`
Overrides:
  `getProtocol` in class `BasicSPSession`
Returns:
  a protocol constant

### supportsLogoutPropagation

public boolean supportsLogoutPropagation()
Gets whether the session allows for logout propagation.

Specified by:
  `supportsLogoutPropagation` in interface `SPSession`
Overrides:
  `supportsLogoutPropagation` in class `BasicSPSession`
Returns:
  whether the session allows for logout propagation

### toString

public String toString()
Description copied from class: `BasicSPSession`

Overrides:
  `toString` in class `BasicSPSession`