const char* getAuthnContextDeclRef() const {\r
return m_obj["authncontext_decl"].string();\r
}\r
- const map<string,const Attribute*>& getAttributes() const {\r
+ const multimap<string,Attribute*>& getAttributes() const {\r
if (m_attributes.empty())\r
unmarshallAttributes();\r
return m_attributes;\r
\r
DDF m_obj;\r
saml2::NameID* m_nameid;\r
- mutable map<string,const Attribute*> m_attributes;\r
+ mutable multimap<string,Attribute*> m_attributes;\r
mutable vector<const char*> m_ids;\r
mutable map<string,Assertion*> m_tokens;\r
SSCache* m_cache;\r
const char* authncontext_class=NULL,\r
const char* authncontext_decl=NULL,\r
const vector<const Assertion*>* tokens=NULL,\r
- const vector<Attribute*>* attributes=NULL\r
+ const multimap<string,Attribute*>* attributes=NULL\r
);\r
Session* find(const char* key, const Application& application, const char* client_addr=NULL, time_t timeout=0);\r
void remove(const char* key, const Application& application, const char* client_addr);\r
{\r
m_obj.destroy();\r
delete m_nameid;\r
- for_each(m_attributes.begin(), m_attributes.end(), cleanup_const_pair<string,Attribute>());\r
+ for_each(m_attributes.begin(), m_attributes.end(), cleanup_pair<string,Attribute>());\r
for_each(m_tokens.begin(), m_tokens.end(), cleanup_pair<string,Assertion>());\r
}\r
\r
while (!attr.isnull()) {\r
try {\r
attribute = Attribute::unmarshall(attr);\r
- m_attributes[attribute->getId()] = attribute;\r
+ m_attributes.insert(make_pair(attribute->getId(), attribute));\r
if (m_cache->m_log.isDebugEnabled())\r
m_cache->m_log.debug("unmarshalled attribute (ID: %s) with %d value%s",\r
attribute->getId(), attr.first().integer(), attr.first().integer()!=1 ? "s" : "");\r
const char* authncontext_class,\r
const char* authncontext_decl,\r
const vector<const Assertion*>* tokens,\r
- const vector<Attribute*>* attributes\r
+ const multimap<string,Attribute*>* attributes\r
)\r
{\r
#ifdef _DEBUG\r
if (attributes) {\r
DDF attr;\r
DDF attrlist = obj.addmember("attributes").list();\r
- for (vector<Attribute*>::const_iterator a=attributes->begin(); a!=attributes->end(); ++a) {\r
- attr = (*a)->marshall();\r
+ for (multimap<string,Attribute*>::const_iterator a=attributes->begin(); a!=attributes->end(); ++a) {\r
+ attr = a->second->marshall();\r
attrlist.add(attr);\r
}\r
}\r
") for (applicationId: " <<\r
application.getId() <<\r
") {";\r
- for (vector<Attribute*>::const_iterator a=attributes->begin(); a!=attributes->end(); ++a)\r
- xlog->log.infoStream() << "\t" << (*a)->getId() << " (" << (*a)->valueCount() << " values)";\r
+ for (multimap<string,Attribute*>::const_iterator a=attributes->begin(); a!=attributes->end(); ++a)\r
+ xlog->log.infoStream() << "\t" << a->second->getId() << " (" << a->second->valueCount() << " values)";\r
xlog->log.info("}");\r
- for_each(attributes->begin(), attributes->end(), xmltooling::cleanup<Attribute>());\r
+ for_each(attributes->begin(), attributes->end(), cleanup_pair<string,Attribute>());\r
}\r
\r
return key.get();\r