'Get session information about a subject gotten from a
specified IdP/AA.
:param name_id: The subject identifier, a NameID instance
:param entity_id: The identifier of the entity_id
:param check_not_on_or_after: if True it will check if this
subject is still valid or if it is too old. Otherwise it
will not check this. True by default.
:return: The session information'

def get(self, name_id, entity_id, check_not_on_or_after=True):

    cni = code(name_id)
    (timestamp, info) = self._db[cni][entity_id]
    if (check_not_on_or_after and time_util.after(timestamp)):
        raise ToOld(('past    %s' % timestamp))
    return (info or None)
