shibboleth-2.6.1
shibsp::Session Class Referenceabstract

Encapsulates access to a user's security session. More...

#include <shibsp/SessionCache.h>

Inheritance diagram for shibsp::Session:

Public Member Functions

virtual const char * getID () const =0
 Returns the session key. More...
 
virtual const char * getApplicationID () const =0
 Returns the session's application ID. More...
 
virtual time_t getExpiration () const =0
 Returns the session expiration. More...
 
virtual time_t getLastAccess () const =0
 Returns the last access time of the session. More...
 
virtual const char * getClientAddress () const =0
 Returns the address of the client associated with the session. More...
 
virtual const char * getEntityID () const =0
 Returns the entityID of the IdP that initiated the session. More...
 
virtual const char * getProtocol () const =0
 Returns the protocol family used to initiate the session. More...
 
virtual const char * getAuthnInstant () const =0
 Returns the UTC timestamp on the authentication event at the IdP. More...
 
virtual const opensaml::saml2::NameID * getNameID () const =0
 Returns the NameID associated with a session. More...
 
virtual const char * getSessionIndex () const =0
 Returns the SessionIndex provided with the session. More...
 
virtual const char * getAuthnContextClassRef () const =0
 Returns a URI containing an AuthnContextClassRef provided with the session. More...
 
virtual const char * getAuthnContextDeclRef () const =0
 Returns a URI containing an AuthnContextDeclRef provided with the session. More...
 
virtual const std::vector< Attribute * > & getAttributes () const =0
 Returns the resolved attributes associated with the session. More...
 
virtual const std::multimap< std::string, const Attribute * > & getIndexedAttributes () const =0
 Returns the resolved attributes associated with the session, indexed by ID. More...
 
virtual const std::vector< const char * > & getAssertionIDs () const =0
 Returns the identifiers of the assertion(s) cached by the session. More...
 
virtual void addAttributes (const std::vector< Attribute *> &attributes)=0
 Adds additional attributes to the session. More...
 
virtual const opensaml::Assertion * getAssertion (const char *id) const =0
 Returns an assertion cached by the session. More...
 
virtual void addAssertion (opensaml::Assertion *assertion)=0
 Stores an assertion in the session. More...
 

Detailed Description

Encapsulates access to a user's security session.

The SessionCache does not itself require locking to manage concurrency, but access to each Session is generally exclusive or at least controlled, and the caller must unlock a Session to dispose of it.

Member Function Documentation

◆ addAssertion()

virtual void shibsp::Session::addAssertion ( opensaml::Assertion *  assertion)
pure virtual

Stores an assertion in the session.

Parameters
assertionpointer to an assertion to cache (will be freed by cache)

◆ addAttributes()

virtual void shibsp::Session::addAttributes ( const std::vector< Attribute *> &  attributes)
pure virtual

Adds additional attributes to the session.

Parameters
attributesreference to an array of Attributes to cache (will be freed by cache)

◆ getApplicationID()

virtual const char* shibsp::Session::getApplicationID ( ) const
pure virtual

Returns the session's application ID.

Returns
unique ID of application bound to session

◆ getAssertion()

virtual const opensaml::Assertion* shibsp::Session::getAssertion ( const char *  id) const
pure virtual

Returns an assertion cached by the session.

Parameters
ididentifier of the assertion to retrieve
Returns
pointer to assertion, or nullptr

◆ getAssertionIDs()

virtual const std::vector<const char*>& shibsp::Session::getAssertionIDs ( ) const
pure virtual

Returns the identifiers of the assertion(s) cached by the session.

The SSO assertion is guaranteed to be first in the set.

Returns
an immutable array of AssertionID values

◆ getAttributes()

virtual const std::vector<Attribute*>& shibsp::Session::getAttributes ( ) const
pure virtual

Returns the resolved attributes associated with the session.

Returns
an immutable array of attributes

◆ getAuthnContextClassRef()

virtual const char* shibsp::Session::getAuthnContextClassRef ( ) const
pure virtual

Returns a URI containing an AuthnContextClassRef provided with the session.

SAML 1.x AuthenticationMethods will be returned as class references.

Returns
a URI identifying the authentication context class

◆ getAuthnContextDeclRef()

virtual const char* shibsp::Session::getAuthnContextDeclRef ( ) const
pure virtual

Returns a URI containing an AuthnContextDeclRef provided with the session.

Returns
a URI identifying the authentication context declaration

◆ getAuthnInstant()

virtual const char* shibsp::Session::getAuthnInstant ( ) const
pure virtual

Returns the UTC timestamp on the authentication event at the IdP.

Returns
the UTC authentication timestamp

◆ getClientAddress()

virtual const char* shibsp::Session::getClientAddress ( ) const
pure virtual

Returns the address of the client associated with the session.

Returns
the client's network address

◆ getEntityID()

virtual const char* shibsp::Session::getEntityID ( ) const
pure virtual

Returns the entityID of the IdP that initiated the session.

Returns
the IdP's entityID

◆ getExpiration()

virtual time_t shibsp::Session::getExpiration ( ) const
pure virtual

Returns the session expiration.

Returns
the session's expiration time or 0 for none

◆ getID()

virtual const char* shibsp::Session::getID ( ) const
pure virtual

Returns the session key.

Returns
unique ID of session

◆ getIndexedAttributes()

virtual const std::multimap<std::string,const Attribute*>& shibsp::Session::getIndexedAttributes ( ) const
pure virtual

Returns the resolved attributes associated with the session, indexed by ID.

Returns
an immutable map of attributes keyed by attribute ID

◆ getLastAccess()

virtual time_t shibsp::Session::getLastAccess ( ) const
pure virtual

Returns the last access time of the session.

Returns
the session's last access time

◆ getNameID()

virtual const opensaml::saml2::NameID* shibsp::Session::getNameID ( ) const
pure virtual

Returns the NameID associated with a session.

SAML 1.x identifiers will be promoted to the 2.0 type.

Returns
a SAML 2.0 NameID associated with the session, if any

◆ getProtocol()

virtual const char* shibsp::Session::getProtocol ( ) const
pure virtual

Returns the protocol family used to initiate the session.

Returns
the protocol constant that represents the general SSO protocol used

◆ getSessionIndex()

virtual const char* shibsp::Session::getSessionIndex ( ) const
pure virtual

Returns the SessionIndex provided with the session.

Returns
the SessionIndex from the original SSO assertion, if any

The documentation for this class was generated from the following file: