Class BasicSPSession

java.lang.Object
net.shibboleth.idp.session.BasicSPSession
All Implemented Interfaces:
SPSession, Component, IdentifiedComponent
Direct Known Subclasses:
CASSPSession, SAML1SPSession, SAML2SPSession

@ThreadSafe public class BasicSPSession extends Object implements SPSession
Implementation support for a concrete SPSession implementation.
  • Field Details

    • serviceId

      @Nonnull @NotEmpty private final String serviceId
      The unique identifier of the service.
    • creationInstant

      @Nonnull private final Instant creationInstant
      The time when this session was created.
    • expirationInstant

      @Nonnull private final Instant expirationInstant
      The time when this session expires.
  • Constructor Details

    • BasicSPSession

      public BasicSPSession(@Nonnull @NotEmpty String id, @Nonnull Instant creation, @Nonnull Instant expiration)
      Constructor.
      Parameters:
      id - the identifier of the service associated with this session
      creation - creation time of session
      expiration - expiration time of session
  • Method Details

    • getId

      @Nonnull @NotEmpty public String getId()
      Specified by:
      getId in interface IdentifiedComponent
    • getCreationInstant

      @Nonnull public Instant getCreationInstant()
      Get the time when this session was created.
      Specified by:
      getCreationInstant in interface SPSession
      Returns:
      time when this session was created
    • getExpirationInstant

      @Nonnull public Instant getExpirationInstant()
      Get the time when this session will expire.
      Specified by:
      getExpirationInstant in interface SPSession
      Returns:
      time when this session will expire
    • getSPSessionKey

      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
      Returns:
      a unique key identifying this subject's session with the service, or null
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(@Nullable Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object