shibboleth-3.4.1
shibsp::StoredSession Class Reference
Inheritance diagram for shibsp::StoredSession:
Collaboration diagram for shibsp::StoredSession:

Public Member Functions

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

Static Public Member Functions

static const char * getAddressFamily (const char *addr)
 

Member Function Documentation

◆ addAssertion()

void shibsp::StoredSession::addAssertion ( opensaml::Assertion *  assertion)
virtual

Stores an assertion in the session.

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

Implements shibsp::Session.

◆ addAttributes()

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

Adds additional attributes to the session.

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

Implements shibsp::Session.

◆ getApplicationID()

const char * shibsp::StoredSession::getApplicationID ( ) const
inlinevirtual

Returns the session's application ID.

Returns
unique ID of application bound to session

Implements shibsp::Session.

◆ getAssertion()

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

Returns an assertion cached by the session.

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

Implements shibsp::Session.

◆ getAssertionIDs()

const std::vector< const char * > & shibsp::StoredSession::getAssertionIDs ( ) const
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

Implements shibsp::Session.

◆ getAttributes()

const std::vector< Attribute * > & shibsp::StoredSession::getAttributes ( ) const
inlinevirtual

Returns the resolved attributes associated with the session.

Returns
an immutable array of attributes

Implements shibsp::Session.

◆ getAuthnContextClassRef()

const char * shibsp::StoredSession::getAuthnContextClassRef ( ) const
inlinevirtual

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

Implements shibsp::Session.

◆ getAuthnContextDeclRef()

const char * shibsp::StoredSession::getAuthnContextDeclRef ( ) const
inlinevirtual

Returns a URI containing an AuthnContextDeclRef provided with the session.

Returns
a URI identifying the authentication context declaration

Implements shibsp::Session.

◆ getAuthnInstant()

const char * shibsp::StoredSession::getAuthnInstant ( ) const
inlinevirtual

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

Returns
the UTC authentication timestamp

Implements shibsp::Session.

◆ getClientAddress()

const char * shibsp::StoredSession::getClientAddress ( ) const
inlinevirtual

Returns the address of the client associated with the session.

Returns
the client's network address

Implements shibsp::Session.

◆ getEntityID()

const char * shibsp::StoredSession::getEntityID ( ) const
inlinevirtual

Returns the entityID of the IdP that initiated the session.

Returns
the IdP's entityID

Implements shibsp::Session.

◆ getExpiration()

time_t shibsp::StoredSession::getExpiration ( ) const
inlinevirtual

Returns the session expiration.

Returns
the session's expiration time or 0 for none

Implements shibsp::Session.

◆ getID()

const char * shibsp::StoredSession::getID ( ) const
inlinevirtual

Returns the session key.

Returns
unique ID of session

Implements shibsp::Session.

◆ getIndexedAttributes()

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

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

Returns
an immutable map of attributes keyed by attribute ID

Implements shibsp::Session.

◆ getLastAccess()

time_t shibsp::StoredSession::getLastAccess ( ) const
inlinevirtual

Returns the last access time of the session.

Returns
the session's last access time

Implements shibsp::Session.

◆ getNameID()

const opensaml::saml2::NameID * shibsp::StoredSession::getNameID ( ) const
inlinevirtual

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

Implements shibsp::Session.

◆ getProtocol()

const char * shibsp::StoredSession::getProtocol ( ) const
inlinevirtual

Returns the protocol family used to initiate the session.

Returns
the protocol constant that represents the general SSO protocol used

Implements shibsp::Session.

◆ getSessionIndex()

const char * shibsp::StoredSession::getSessionIndex ( ) const
inlinevirtual

Returns the SessionIndex provided with the session.

Returns
the SessionIndex from the original SSO assertion, if any

Implements shibsp::Session.


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