shibboleth-3.5.0

Public Member Functions | Static Public Member Functions | List of all members
shibsp::StoredSession Class Reference
Inheritance 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. More...
const char * | getApplicationID () const
| Returns the session's application ID. More...
const char * | getClientAddress () const
| Returns the address of the client associated with the session. More...
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. More...
const char * | getProtocol () const
| Returns the protocol family used to initiate the session. More...
const char * | getAuthnInstant () const
| Returns the UTC timestamp on the authentication event at the IdP. More...
const opensaml::saml2::NameID * | getNameID () const
| Returns the NameID associated with a session. More...
const char * | getSessionIndex () const
| Returns the SessionIndex provided with the session. More...
const char * | getAuthnContextClassRef () const
| Returns a URI containing an AuthnContextClassRef provided with the session. More...
const char * | getAuthnContextDeclRef () const
| Returns a URI containing an AuthnContextDeclRef provided with the session. More...
const std::vector< Attribute * > & | getAttributes () const
| Returns the resolved attributes associated with the session. More...
const std::multimap< std::string, const Attribute * > & | getIndexedAttributes () const
| Returns the resolved attributes associated with the session, indexed by ID. More...
const std::vector< const char * > & | getAssertionIDs () const
| Returns the identifiers of the assertion(s) cached by the session. More...
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. More...
const opensaml::Assertion * | getAssertion (const char *id) const
| Returns an assertion cached by the session. More...
void | addAssertion (opensaml::Assertion *assertion)
| Stores an assertion in the session. More...
time_t | getExpiration () const
| Returns the session expiration. More...
time_t | getLastAccess () const
| Returns the last access time of the session. More...
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...

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

  assertion | pointer 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

  attributes | reference to an array of Attributes to cache (will be freed by cache)

Implements shibsp::Session.

## ◆ getApplicationID()

const char * shibsp::StoredSession::getApplicationID | ( |  | ) | const
| inline virtual

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

  id | identifier 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
| inline virtual

Returns the resolved attributes associated with the session.

Returns
  an immutable array of attributes

Implements shibsp::Session.

## ◆ getAuthnContextClassRef()

const char * shibsp::StoredSession::getAuthnContextClassRef | ( |  | ) | const
| inline 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

Implements shibsp::Session.

## ◆ getAuthnContextDeclRef()

const char * shibsp::StoredSession::getAuthnContextDeclRef | ( |  | ) | const
| inline virtual

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
| inline virtual

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
| inline virtual

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
| inline virtual

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
| inline virtual

Returns the session expiration.

Returns
  the session's expiration time or 0 for none

Implements shibsp::Session.

## ◆ getID()

const char * shibsp::StoredSession::getID | ( |  | ) | const
| inline virtual

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
| inline virtual

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

Implements shibsp::Session.

## ◆ getProtocol()

const char * shibsp::StoredSession::getProtocol | ( |  | ) | const
| inline virtual

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
| inline virtual

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:

- shibsp/impl/StoredSession.h