Class BasicSPSession

    • Field Detail

      • 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 Detail

      • 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 Detail

      • 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