Package net.shibboleth.idp.saml.session

# Class SAML2SPSession

java.lang.Object
net.shibboleth.idp.session.BasicSPSession
net.shibboleth.idp.saml.session.SAML2SPSession

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

public class SAML2SPSession extends BasicSPSession
Extends a `BasicSPSession` with SAML 2.0 information required for reverse lookup in the case of a logout.

## Field Summary

Fields
Modifier and Type
Field
Description
`private final String`
`acsLocation`
The ACS location used for the associated response.
`private final NameID`
`nameID`
The NameID asserted to the SP.
`private final String`
`sessionIndex`
The SessionIndex asserted to the SP.
`private final boolean`
`supportsLogoutPropagation`
Whether logout propagation is possible.

## Constructor Summary

Constructors
Constructor
Description
`SAML2SPSession(String id, Instant creation, Instant expiration, NameID assertedNameID, String assertedIndex, String acsLoc, boolean supportsLogoutProp)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`equals(Object obj)`
`String`
`getACSLocation()`
Get the ACS location used for the response that produced this session.
`NameID`
`getNameID()`
Get the `NameID` asserted to the SP.
`String`
`getProtocol()`
Get a protocol constant for the session suitable for metadata lookup.
`String`
`getSessionIndex()`
Get the `SessionIndex` value asserted to the SP.
`String`
`getSPSessionKey()`
Get a unique key identifying this subject's session with the service.
`int`
`hashCode()`
`boolean`
`supportsLogoutPropagation()`
Gets whether the session allows for logout propagation.
`String`
`toString()`

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

`getCreationInstant, getExpirationInstant, getId`

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

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

## Field Details

### nameID

@Nonnull private final NameID nameID
The NameID asserted to the SP.

### sessionIndex

@Nonnull @NotEmpty private final String sessionIndex
The SessionIndex asserted to the SP.

### acsLocation

@Nullable @NotEmpty private final String acsLocation
The ACS location used for the associated response.

### supportsLogoutPropagation

private final boolean supportsLogoutPropagation
Whether logout propagation is possible.

## Constructor Details

### SAML2SPSession

public SAML2SPSession(@Nonnull @NotEmpty String id, @Nonnull Instant creation, @Nonnull Instant expiration, @Nonnull NameID assertedNameID, @Nonnull @NotEmpty String assertedIndex, @Nullable @NotEmpty String acsLoc, boolean supportsLogoutProp)
Constructor.

Parameters:
  `id` - the identifier of the service associated with this session
  `creation` - creation time of session
  `expiration` - expiration time of session
  `assertedNameID` - the NameID asserted to the SP
  `assertedIndex` - the SessionIndex asserted to the SP
  `acsLoc` - the response endpoint used
  `supportsLogoutProp` - whether the session supports logout propagation

## Method Details

### getNameID

@Nonnull public NameID getNameID()
Get the `NameID` asserted to the SP.

Returns:
  the asserted `NameID`

### getSessionIndex

@Nonnull @NotEmpty public String getSessionIndex()
Get the `SessionIndex` value asserted to the SP.

Returns:
  the SessionIndex value

### 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

### getACSLocation

@Nullable @NotEmpty public String getACSLocation()
Get the ACS location used for the response that produced this session.

Returns:
  ACS location

### 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

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `BasicSPSession`

### equals

public boolean equals(Object obj)

Overrides:
  `equals` in class `BasicSPSession`

### toString

public String toString()

Overrides:
  `toString` in class `BasicSPSession`