2 * Copyright 2001-2007 Internet2
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 * Assertions20Impl.cpp
20 * Implementation classes for SAML 2.0 Assertions schema
24 #include "exceptions.h"
25 #include "saml/encryption/EncryptedKeyResolver.h"
26 #include "saml2/core/Assertions.h"
28 #include <xmltooling/AbstractComplexElement.h>
29 #include <xmltooling/AbstractSimpleElement.h>
30 #include <xmltooling/impl/AnyElement.h>
31 #include <xmltooling/io/AbstractXMLObjectMarshaller.h>
32 #include <xmltooling/io/AbstractXMLObjectUnmarshaller.h>
33 #include <xmltooling/util/XMLHelper.h>
36 #include <xercesc/util/XMLUniDefs.hpp>
38 using namespace opensaml::saml2;
39 using namespace xmlencryption;
40 using namespace xmlsignature;
41 using namespace xmltooling;
43 using xmlconstants::XSI_NS;
44 using xmlconstants::XMLSIG_NS;
45 using xmlconstants::XMLENC_NS;
46 using xmlconstants::XML_BOOL_NULL;
47 using samlconstants::SAML20_NS;
50 #if defined (_MSC_VER)
51 #pragma warning( push )
52 #pragma warning( disable : 4250 4251 )
58 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AssertionIDRef);
59 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AssertionURIRef);
60 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,Audience);
61 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AuthnContextClassRef);
62 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AuthnContextDeclRef);
63 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AuthenticatingAuthority);
65 class SAML_DLLLOCAL NameIDTypeImpl : public virtual NameIDType,
66 public AbstractSimpleElement,
67 public AbstractDOMCachingXMLObject,
68 public AbstractXMLObjectMarshaller,
69 public AbstractXMLObjectUnmarshaller
72 m_Format=m_SPProvidedID=m_NameQualifier=m_SPNameQualifier=NULL;
81 virtual ~NameIDTypeImpl() {
82 XMLString::release(&m_NameQualifier);
83 XMLString::release(&m_SPNameQualifier);
84 XMLString::release(&m_Format);
85 XMLString::release(&m_SPProvidedID);
88 NameIDTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
89 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
93 NameIDTypeImpl(const NameIDTypeImpl& src)
94 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
96 setNameQualifier(src.getNameQualifier());
97 setSPNameQualifier(src.getSPNameQualifier());
98 setFormat(src.getFormat());
99 setSPProvidedID(src.getSPProvidedID());
102 IMPL_XMLOBJECT_CLONE(NameIDType);
103 IMPL_STRING_ATTRIB(NameQualifier);
104 IMPL_STRING_ATTRIB(SPNameQualifier);
105 IMPL_STRING_ATTRIB(Format);
106 IMPL_STRING_ATTRIB(SPProvidedID);
109 void marshallAttributes(DOMElement* domElement) const {
110 MARSHALL_STRING_ATTRIB(NameQualifier,NAMEQUALIFIER,NULL);
111 MARSHALL_STRING_ATTRIB(SPNameQualifier,SPNAMEQUALIFIER,NULL);
112 MARSHALL_STRING_ATTRIB(Format,FORMAT,NULL);
113 MARSHALL_STRING_ATTRIB(SPProvidedID,SPPROVIDEDID,NULL);
116 void processAttribute(const DOMAttr* attribute) {
117 PROC_STRING_ATTRIB(NameQualifier,NAMEQUALIFIER,NULL);
118 PROC_STRING_ATTRIB(SPNameQualifier,SPNAMEQUALIFIER,NULL);
119 PROC_STRING_ATTRIB(Format,FORMAT,NULL);
120 PROC_STRING_ATTRIB(SPProvidedID,SPPROVIDEDID,NULL);
121 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
125 class SAML_DLLLOCAL NameIDImpl : public virtual NameID, public NameIDTypeImpl
128 virtual ~NameIDImpl() {}
130 NameIDImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
131 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
133 NameIDImpl(const NameIDImpl& src) : AbstractXMLObject(src), NameIDTypeImpl(src) {}
135 IMPL_XMLOBJECT_CLONE(NameID);
136 NameIDType* cloneNameIDType() const {
137 return new NameIDImpl(*this);
141 class SAML_DLLLOCAL IssuerImpl : public virtual Issuer, public NameIDTypeImpl
144 virtual ~IssuerImpl() {}
146 IssuerImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
147 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
149 IssuerImpl(const IssuerImpl& src) : AbstractXMLObject(src), NameIDTypeImpl(src) {}
151 IMPL_XMLOBJECT_CLONE(Issuer);
152 NameIDType* cloneNameIDType() const {
153 return new IssuerImpl(*this);
157 //TODO unit test for this
158 // - need to test encryption/decryption too, or already done in xmltooling ?
159 class SAML_DLLLOCAL EncryptedElementTypeImpl : public virtual EncryptedElementType,
160 public AbstractComplexElement,
161 public AbstractDOMCachingXMLObject,
162 public AbstractXMLObjectMarshaller,
163 public AbstractXMLObjectUnmarshaller
166 m_EncryptedData=NULL;
167 m_children.push_back(NULL);
168 m_pos_EncryptedData=m_children.begin();
172 EncryptedElementTypeImpl() {
177 virtual ~EncryptedElementTypeImpl() {}
179 EncryptedElementTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
180 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
184 EncryptedElementTypeImpl(const EncryptedElementTypeImpl& src)
185 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
187 if (src.getEncryptedData())
188 setEncryptedData(src.getEncryptedData()->cloneEncryptedData());
189 VectorOf(EncryptedKey) v=getEncryptedKeys();
190 for (vector<EncryptedKey*>::const_iterator i=src.m_EncryptedKeys.begin(); i!=src.m_EncryptedKeys.end(); i++) {
192 v.push_back((*i)->cloneEncryptedKey());
197 IMPL_XMLOBJECT_CLONE(EncryptedElementType);
198 IMPL_TYPED_FOREIGN_CHILD(EncryptedData,xmlencryption);
199 IMPL_TYPED_FOREIGN_CHILDREN(EncryptedKey,xmlencryption,m_children.end());
202 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
203 PROC_TYPED_FOREIGN_CHILD(EncryptedData,xmlencryption,XMLENC_NS,false);
204 PROC_TYPED_FOREIGN_CHILDREN(EncryptedKey,xmlencryption,XMLENC_NS,false);
205 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
209 class SAML_DLLLOCAL EncryptedIDImpl : public virtual EncryptedID, public EncryptedElementTypeImpl
212 virtual ~EncryptedIDImpl() {}
214 EncryptedIDImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
215 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
217 EncryptedIDImpl(const EncryptedIDImpl& src) : AbstractXMLObject(src), EncryptedElementTypeImpl(src) {}
219 IMPL_XMLOBJECT_CLONE(EncryptedID);
220 EncryptedElementType* cloneEncryptedElementType() const {
221 return new EncryptedIDImpl(*this);
225 class SAML_DLLLOCAL AudienceRestrictionImpl : public virtual AudienceRestriction,
226 public AbstractComplexElement,
227 public AbstractDOMCachingXMLObject,
228 public AbstractXMLObjectMarshaller,
229 public AbstractXMLObjectUnmarshaller
232 virtual ~AudienceRestrictionImpl() {}
234 AudienceRestrictionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
235 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
238 AudienceRestrictionImpl(const AudienceRestrictionImpl& src)
239 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
240 VectorOf(Audience) v=getAudiences();
241 for (vector<Audience*>::const_iterator i=src.m_Audiences.begin(); i!=src.m_Audiences.end(); i++) {
243 v.push_back((*i)->cloneAudience());
248 IMPL_XMLOBJECT_CLONE(AudienceRestriction);
249 Condition* cloneCondition() const {
250 return cloneAudienceRestriction();
252 IMPL_TYPED_CHILDREN(Audience,m_children.end());
255 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
256 PROC_TYPED_CHILDREN(Audience,SAML20_NS,false);
257 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
261 class SAML_DLLLOCAL OneTimeUseImpl : public virtual OneTimeUse,
262 public AbstractSimpleElement,
263 public AbstractDOMCachingXMLObject,
264 public AbstractXMLObjectMarshaller,
265 public AbstractXMLObjectUnmarshaller
268 virtual ~OneTimeUseImpl() {}
270 OneTimeUseImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
271 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
274 OneTimeUseImpl(const OneTimeUseImpl& src)
275 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
278 IMPL_XMLOBJECT_CLONE(OneTimeUse);
279 Condition* cloneCondition() const {
280 return cloneOneTimeUse();
284 class SAML_DLLLOCAL ProxyRestrictionImpl : public virtual ProxyRestriction,
285 public AbstractComplexElement,
286 public AbstractDOMCachingXMLObject,
287 public AbstractXMLObjectMarshaller,
288 public AbstractXMLObjectUnmarshaller
291 virtual ~ProxyRestrictionImpl() {
292 XMLString::release(&m_Count);
295 ProxyRestrictionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
296 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
300 ProxyRestrictionImpl(const ProxyRestrictionImpl& src)
301 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
302 setCount(src.m_Count);
303 VectorOf(Audience) v=getAudiences();
304 for (vector<Audience*>::const_iterator i=src.m_Audiences.begin(); i!=src.m_Audiences.end(); i++) {
306 v.push_back((*i)->cloneAudience());
311 IMPL_XMLOBJECT_CLONE(ProxyRestriction);
312 Condition* cloneCondition() const {
313 return cloneProxyRestriction();
315 IMPL_TYPED_CHILDREN(Audience,m_children.end());
316 IMPL_INTEGER_ATTRIB(Count);
319 void marshallAttributes(DOMElement* domElement) const {
320 MARSHALL_INTEGER_ATTRIB(Count,COUNT,NULL);
323 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
324 PROC_TYPED_CHILDREN(Audience,SAML20_NS,false);
325 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
328 void processAttribute(const DOMAttr* attribute) {
329 PROC_INTEGER_ATTRIB(Count,COUNT,NULL);
330 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
335 class SAML_DLLLOCAL ConditionsImpl : public virtual Conditions,
336 public AbstractComplexElement,
337 public AbstractDOMCachingXMLObject,
338 public AbstractXMLObjectMarshaller,
339 public AbstractXMLObjectUnmarshaller
342 m_NotBefore=m_NotOnOrAfter=NULL;
345 virtual ~ConditionsImpl() {
347 delete m_NotOnOrAfter;
350 ConditionsImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
351 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
355 ConditionsImpl(const ConditionsImpl& src)
356 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
358 setNotBefore(src.getNotBefore());
359 setNotOnOrAfter(src.getNotOnOrAfter());
361 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
363 AudienceRestriction* arc=dynamic_cast<AudienceRestriction*>(*i);
365 getAudienceRestrictions().push_back(arc->cloneAudienceRestriction());
369 OneTimeUse* dncc=dynamic_cast<OneTimeUse*>(*i);
371 getOneTimeUses().push_back(dncc->cloneOneTimeUse());
375 ProxyRestriction* prc=dynamic_cast<ProxyRestriction*>(*i);
377 getProxyRestrictions().push_back(prc->cloneProxyRestriction());
381 Condition* c=dynamic_cast<Condition*>(*i);
383 getConditions().push_back(c->cloneCondition());
390 IMPL_XMLOBJECT_CLONE(Conditions);
391 IMPL_DATETIME_ATTRIB(NotBefore,0);
392 IMPL_DATETIME_ATTRIB(NotOnOrAfter,SAMLTIME_MAX);
393 IMPL_TYPED_CHILDREN(AudienceRestriction, m_children.end());
394 IMPL_TYPED_CHILDREN(OneTimeUse,m_children.end());
395 IMPL_TYPED_CHILDREN(ProxyRestriction, m_children.end());
396 IMPL_TYPED_CHILDREN(Condition,m_children.end());
399 void marshallAttributes(DOMElement* domElement) const {
400 MARSHALL_DATETIME_ATTRIB(NotBefore,NOTBEFORE,NULL);
401 MARSHALL_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,NULL);
404 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
405 PROC_TYPED_CHILDREN(AudienceRestriction,SAML20_NS,false);
406 PROC_TYPED_CHILDREN(OneTimeUse,SAML20_NS,false);
407 PROC_TYPED_CHILDREN(ProxyRestriction,SAML20_NS,false);
408 PROC_TYPED_CHILDREN(Condition,SAML20_NS,false);
409 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
412 void processAttribute(const DOMAttr* attribute) {
413 PROC_DATETIME_ATTRIB(NotBefore,NOTBEFORE,NULL);
414 PROC_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,NULL);
415 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
419 class SAML_DLLLOCAL SubjectConfirmationDataTypeImpl : public virtual SubjectConfirmationDataType, public virtual AbstractXMLObject
422 m_NotBefore=m_NotOnOrAfter=NULL;
423 m_Recipient=m_InResponseTo=m_Address=NULL;
427 SubjectConfirmationDataTypeImpl() {
432 virtual ~SubjectConfirmationDataTypeImpl() {
434 delete m_NotOnOrAfter;
435 XMLString::release(&m_Recipient);
436 XMLString::release(&m_InResponseTo);
437 XMLString::release(&m_Address);
440 SubjectConfirmationDataTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
441 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
445 SubjectConfirmationDataTypeImpl(const SubjectConfirmationDataTypeImpl& src) : AbstractXMLObject(src) {
447 setNotBefore(src.getNotBefore());
448 setNotOnOrAfter(src.getNotOnOrAfter());
449 setRecipient(src.getRecipient());
450 setInResponseTo(src.getInResponseTo());
451 setAddress(src.getAddress());
454 IMPL_DATETIME_ATTRIB(NotBefore,0);
455 IMPL_DATETIME_ATTRIB(NotOnOrAfter,SAMLTIME_MAX);
456 IMPL_STRING_ATTRIB(Recipient);
457 IMPL_STRING_ATTRIB(InResponseTo);
458 IMPL_STRING_ATTRIB(Address);
461 void marshallAttributes(DOMElement* domElement) const {
462 MARSHALL_DATETIME_ATTRIB(NotBefore,NOTBEFORE,NULL);
463 MARSHALL_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,NULL);
464 MARSHALL_STRING_ATTRIB(Recipient,RECIPIENT,NULL);
465 MARSHALL_STRING_ATTRIB(InResponseTo,INRESPONSETO,NULL);
466 MARSHALL_STRING_ATTRIB(Address,ADDRESS,NULL);
469 void processAttribute(const DOMAttr* attribute) {
470 PROC_DATETIME_ATTRIB(NotBefore,NOTBEFORE,NULL);
471 PROC_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,NULL);
472 PROC_STRING_ATTRIB(Recipient,RECIPIENT,NULL);
473 PROC_STRING_ATTRIB(InResponseTo,INRESPONSETO,NULL);
474 PROC_STRING_ATTRIB(Address,ADDRESS,NULL);
478 class SAML_DLLLOCAL SubjectConfirmationDataImpl : public SubjectConfirmationData,
479 public SubjectConfirmationDataTypeImpl, public AnyElementImpl
482 virtual ~SubjectConfirmationDataImpl() {}
484 SubjectConfirmationDataImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
485 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
488 SubjectConfirmationDataImpl(const SubjectConfirmationDataImpl& src)
489 : SubjectConfirmationDataTypeImpl(src), AnyElementImpl(src) {
492 IMPL_XMLOBJECT_CLONE(SubjectConfirmationData);
493 SubjectConfirmationDataType* cloneSubjectConfirmationDataType() const {
494 return new SubjectConfirmationDataImpl(*this);
497 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
498 if (!qualifiedName.hasNamespaceURI()) {
499 if (XMLString::equals(qualifiedName.getLocalPart(),NOTBEFORE_ATTRIB_NAME)) {
503 else if (XMLString::equals(qualifiedName.getLocalPart(),NOTONORAFTER_ATTRIB_NAME)) {
504 setNotOnOrAfter(value);
507 else if (XMLString::equals(qualifiedName.getLocalPart(),RECIPIENT_ATTRIB_NAME)) {
511 else if (XMLString::equals(qualifiedName.getLocalPart(),INRESPONSETO_ATTRIB_NAME)) {
512 setInResponseTo(value);
515 else if (XMLString::equals(qualifiedName.getLocalPart(),ADDRESS_ATTRIB_NAME)) {
520 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
524 void marshallAttributes(DOMElement* domElement) const {
525 SubjectConfirmationDataTypeImpl::marshallAttributes(domElement);
526 AnyElementImpl::marshallAttributes(domElement);
529 void processAttribute(const DOMAttr* attribute) {
530 PROC_DATETIME_ATTRIB(NotBefore,NOTBEFORE,NULL);
531 PROC_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,NULL);
532 PROC_STRING_ATTRIB(Recipient,RECIPIENT,NULL);
533 PROC_STRING_ATTRIB(InResponseTo,INRESPONSETO,NULL);
534 PROC_STRING_ATTRIB(Address,ADDRESS,NULL);
535 AnyElementImpl::processAttribute(attribute);
539 class SAML_DLLLOCAL KeyInfoConfirmationDataTypeImpl : public virtual KeyInfoConfirmationDataType,
540 public SubjectConfirmationDataTypeImpl,
541 public AbstractComplexElement,
542 public AbstractAttributeExtensibleXMLObject,
543 public AbstractDOMCachingXMLObject,
544 public AbstractXMLObjectMarshaller,
545 public AbstractXMLObjectUnmarshaller
548 virtual ~KeyInfoConfirmationDataTypeImpl() {}
550 KeyInfoConfirmationDataTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
551 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
554 KeyInfoConfirmationDataTypeImpl(const KeyInfoConfirmationDataTypeImpl& src)
555 : AbstractXMLObject(src), SubjectConfirmationDataTypeImpl(src), AbstractComplexElement(src),
556 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
557 VectorOf(KeyInfo) v=getKeyInfos();
558 for (vector<KeyInfo*>::const_iterator i=src.m_KeyInfos.begin(); i!=src.m_KeyInfos.end(); ++i)
559 v.push_back((*i)->cloneKeyInfo());
562 IMPL_XMLOBJECT_CLONE(KeyInfoConfirmationDataType);
563 SubjectConfirmationDataType* cloneSubjectConfirmationDataType() const {
564 return new KeyInfoConfirmationDataTypeImpl(*this);
567 IMPL_TYPED_CHILDREN(KeyInfo,m_children.end());
570 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
571 if (!qualifiedName.hasNamespaceURI()) {
572 if (XMLString::equals(qualifiedName.getLocalPart(),NOTBEFORE_ATTRIB_NAME)) {
576 else if (XMLString::equals(qualifiedName.getLocalPart(),NOTONORAFTER_ATTRIB_NAME)) {
577 setNotOnOrAfter(value);
580 else if (XMLString::equals(qualifiedName.getLocalPart(),RECIPIENT_ATTRIB_NAME)) {
584 else if (XMLString::equals(qualifiedName.getLocalPart(),INRESPONSETO_ATTRIB_NAME)) {
585 setInResponseTo(value);
588 else if (XMLString::equals(qualifiedName.getLocalPart(),ADDRESS_ATTRIB_NAME)) {
593 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
597 void marshallAttributes(DOMElement* domElement) const {
598 SubjectConfirmationDataTypeImpl::marshallAttributes(domElement);
599 marshallExtensionAttributes(domElement);
602 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
603 PROC_TYPED_CHILDREN(KeyInfo,XMLSIG_NS,false);
604 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
607 void processAttribute(const DOMAttr* attribute) {
608 unmarshallExtensionAttribute(attribute);
612 class SAML_DLLLOCAL SubjectConfirmationImpl : public virtual SubjectConfirmation,
613 public AbstractComplexElement,
614 public AbstractDOMCachingXMLObject,
615 public AbstractXMLObjectMarshaller,
616 public AbstractXMLObjectUnmarshaller
623 m_SubjectConfirmationData=NULL;
624 m_children.push_back(NULL);
625 m_children.push_back(NULL);
626 m_children.push_back(NULL);
627 m_children.push_back(NULL);
628 m_pos_BaseID=m_children.begin();
629 m_pos_NameID=m_pos_BaseID;
631 m_pos_EncryptedID=m_pos_NameID;
633 m_pos_SubjectConfirmationData=m_pos_EncryptedID;
634 ++m_pos_SubjectConfirmationData;
637 virtual ~SubjectConfirmationImpl() {}
639 SubjectConfirmationImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
640 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
644 SubjectConfirmationImpl(const SubjectConfirmationImpl& src)
645 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
647 setMethod(src.getMethod());
649 setBaseID(src.getBaseID()->cloneBaseID());
651 setNameID(src.getNameID()->cloneNameID());
652 if (src.getEncryptedID())
653 setEncryptedID(src.getEncryptedID()->cloneEncryptedID());
654 if (src.getSubjectConfirmationData())
655 setSubjectConfirmationData(src.getSubjectConfirmationData()->clone());
658 IMPL_XMLOBJECT_CLONE(SubjectConfirmation);
659 IMPL_STRING_ATTRIB(Method);
660 IMPL_TYPED_CHILD(BaseID);
661 IMPL_TYPED_CHILD(NameID);
662 IMPL_TYPED_CHILD(EncryptedID);
663 IMPL_XMLOBJECT_CHILD(SubjectConfirmationData);
666 void marshallAttributes(DOMElement* domElement) const {
667 MARSHALL_STRING_ATTRIB(Method,METHOD,NULL);
670 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
671 PROC_TYPED_CHILD(BaseID,SAML20_NS,false);
672 PROC_TYPED_CHILD(NameID,SAML20_NS,false);
673 PROC_TYPED_CHILD(EncryptedID,SAML20_NS,false);
674 PROC_XMLOBJECT_CHILD(SubjectConfirmationData,SAML20_NS);
675 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
678 void processAttribute(const DOMAttr* attribute) {
679 PROC_STRING_ATTRIB(Method,METHOD,NULL);
680 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
684 class SAML_DLLLOCAL SubjectImpl : public virtual Subject,
685 public AbstractComplexElement,
686 public AbstractDOMCachingXMLObject,
687 public AbstractXMLObjectMarshaller,
688 public AbstractXMLObjectUnmarshaller
694 m_children.push_back(NULL);
695 m_children.push_back(NULL);
696 m_children.push_back(NULL);
697 m_pos_BaseID=m_children.begin();
698 m_pos_NameID=m_pos_BaseID;
700 m_pos_EncryptedID=m_pos_NameID;
704 virtual ~SubjectImpl() {}
706 SubjectImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
707 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
711 SubjectImpl(const SubjectImpl& src)
712 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
715 setBaseID(src.getBaseID()->cloneBaseID());
717 setNameID(src.getNameID()->cloneNameID());
718 if (src.getEncryptedID())
719 setEncryptedID(src.getEncryptedID()->cloneEncryptedID());
720 VectorOf(SubjectConfirmation) v=getSubjectConfirmations();
721 for (vector<SubjectConfirmation*>::const_iterator i=src.m_SubjectConfirmations.begin(); i!=src.m_SubjectConfirmations.end(); i++) {
723 v.push_back((*i)->cloneSubjectConfirmation());
728 IMPL_XMLOBJECT_CLONE(Subject);
729 IMPL_TYPED_CHILD(NameID);
730 IMPL_TYPED_CHILD(BaseID);
731 IMPL_TYPED_CHILD(EncryptedID);
732 IMPL_TYPED_CHILDREN(SubjectConfirmation,m_children.end());
735 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
736 PROC_TYPED_CHILD(BaseID,SAML20_NS,false);
737 PROC_TYPED_CHILD(NameID,SAML20_NS,false);
738 PROC_TYPED_CHILD(EncryptedID,SAML20_NS,false);
739 PROC_TYPED_CHILDREN(SubjectConfirmation,SAML20_NS,false);
740 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
744 class SAML_DLLLOCAL SubjectLocalityImpl : public virtual SubjectLocality,
745 public AbstractSimpleElement,
746 public AbstractDOMCachingXMLObject,
747 public AbstractXMLObjectMarshaller,
748 public AbstractXMLObjectUnmarshaller
751 m_Address=m_DNSName=NULL;
754 virtual ~SubjectLocalityImpl() {
755 XMLString::release(&m_Address);
756 XMLString::release(&m_DNSName);
759 SubjectLocalityImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
760 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
764 SubjectLocalityImpl(const SubjectLocalityImpl& src)
765 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
767 setAddress(src.getAddress());
768 setDNSName(src.getDNSName());
771 IMPL_XMLOBJECT_CLONE(SubjectLocality);
772 IMPL_STRING_ATTRIB(Address);
773 IMPL_STRING_ATTRIB(DNSName);
776 void marshallAttributes(DOMElement* domElement) const {
777 MARSHALL_STRING_ATTRIB(Address,ADDRESS,NULL);
778 MARSHALL_STRING_ATTRIB(DNSName,DNSNAME,NULL);
781 void processAttribute(const DOMAttr* attribute) {
782 PROC_STRING_ATTRIB(Address,ADDRESS,NULL);
783 PROC_STRING_ATTRIB(DNSName,DNSNAME,NULL);
784 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
788 //TODO need unit test for this
789 class SAML_DLLLOCAL AuthnContextDeclImpl : public virtual AuthnContextDecl, public AnyElementImpl
792 virtual ~AuthnContextDeclImpl() {}
794 AuthnContextDeclImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
795 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
798 AuthnContextDeclImpl(const AuthnContextDeclImpl& src) : AnyElementImpl(src) {
801 IMPL_XMLOBJECT_CLONE(AuthnContextDecl);
804 class SAML_DLLLOCAL AuthnContextImpl : public virtual AuthnContext,
805 public AbstractComplexElement,
806 public AbstractDOMCachingXMLObject,
807 public AbstractXMLObjectMarshaller,
808 public AbstractXMLObjectUnmarshaller
811 m_AuthnContextClassRef=NULL;
812 m_AuthnContextDecl=NULL;
813 m_AuthnContextDeclRef=NULL;
814 m_children.push_back(NULL);
815 m_children.push_back(NULL);
816 m_children.push_back(NULL);
817 m_pos_AuthnContextClassRef=m_children.begin();
818 m_pos_AuthnContextDecl=m_pos_AuthnContextClassRef;
819 ++m_pos_AuthnContextDecl;
820 m_pos_AuthnContextDeclRef=m_pos_AuthnContextDecl;
821 ++m_pos_AuthnContextDeclRef;
824 virtual ~AuthnContextImpl() {}
826 AuthnContextImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
827 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
831 AuthnContextImpl(const AuthnContextImpl& src)
832 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
834 if (src.getAuthnContextClassRef())
835 setAuthnContextClassRef(src.getAuthnContextClassRef()->cloneAuthnContextClassRef());
836 if (src.getAuthnContextDecl())
837 setAuthnContextDecl(src.getAuthnContextDecl()->clone());
838 if (src.getAuthnContextDeclRef())
839 setAuthnContextDeclRef(src.getAuthnContextDeclRef()->cloneAuthnContextDeclRef());
840 VectorOf(AuthenticatingAuthority) v=getAuthenticatingAuthoritys();
841 for (vector<AuthenticatingAuthority*>::const_iterator i=src.m_AuthenticatingAuthoritys.begin(); i!=src.m_AuthenticatingAuthoritys.end(); i++) {
843 v.push_back((*i)->cloneAuthenticatingAuthority());
848 IMPL_XMLOBJECT_CLONE(AuthnContext);
849 IMPL_TYPED_CHILD(AuthnContextClassRef);
850 IMPL_XMLOBJECT_CHILD(AuthnContextDecl);
851 IMPL_TYPED_CHILD(AuthnContextDeclRef);
852 IMPL_TYPED_CHILDREN(AuthenticatingAuthority,m_children.end());
855 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
856 PROC_TYPED_CHILD(AuthnContextClassRef,SAML20_NS,false);
857 PROC_XMLOBJECT_CHILD(AuthnContextDecl,SAML20_NS);
858 PROC_TYPED_CHILD(AuthnContextDeclRef,SAML20_NS,false);
859 PROC_TYPED_CHILDREN(AuthenticatingAuthority,SAML20_NS,false);
860 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
864 class SAML_DLLLOCAL AuthnStatementImpl : public virtual AuthnStatement,
865 public AbstractComplexElement,
866 public AbstractDOMCachingXMLObject,
867 public AbstractXMLObjectMarshaller,
868 public AbstractXMLObjectUnmarshaller
873 m_SessionNotOnOrAfter=NULL;
874 m_SubjectLocality=NULL;
876 m_children.push_back(NULL);
877 m_children.push_back(NULL);
878 m_pos_SubjectLocality=m_children.begin();
879 m_pos_AuthnContext=m_pos_SubjectLocality;
880 ++m_pos_AuthnContext;
883 virtual ~AuthnStatementImpl() {
884 delete m_AuthnInstant;
885 XMLString::release(&m_SessionIndex);
886 delete m_SessionNotOnOrAfter;
889 AuthnStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
890 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
894 AuthnStatementImpl(const AuthnStatementImpl& src)
895 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
897 setAuthnInstant(src.getAuthnInstant());
898 setSessionIndex(src.getSessionIndex());
899 setSessionNotOnOrAfter(src.getSessionNotOnOrAfter());
900 if (src.getSubjectLocality())
901 setSubjectLocality(src.getSubjectLocality()->cloneSubjectLocality());
902 if (src.getAuthnContext())
903 setAuthnContext(src.getAuthnContext()->cloneAuthnContext());
906 IMPL_XMLOBJECT_CLONE(AuthnStatement);
907 Statement* cloneStatement() const {
908 return cloneAuthnStatement();
910 IMPL_DATETIME_ATTRIB(AuthnInstant,0);
911 IMPL_STRING_ATTRIB(SessionIndex);
912 IMPL_DATETIME_ATTRIB(SessionNotOnOrAfter,SAMLTIME_MAX);
913 IMPL_TYPED_CHILD(SubjectLocality);
914 IMPL_TYPED_CHILD(AuthnContext);
917 void marshallAttributes(DOMElement* domElement) const {
918 MARSHALL_DATETIME_ATTRIB(AuthnInstant,AUTHNINSTANT,NULL);
919 MARSHALL_STRING_ATTRIB(SessionIndex,SESSIONINDEX,NULL);
920 MARSHALL_DATETIME_ATTRIB(SessionNotOnOrAfter,SESSIONNOTONORAFTER,NULL);
923 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
924 PROC_TYPED_CHILD(SubjectLocality,SAML20_NS,false);
925 PROC_TYPED_CHILD(AuthnContext,SAML20_NS,false);
926 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
929 void processAttribute(const DOMAttr* attribute) {
930 PROC_DATETIME_ATTRIB(AuthnInstant,AUTHNINSTANT,NULL);
931 PROC_STRING_ATTRIB(SessionIndex,SESSIONINDEX,NULL);
932 PROC_DATETIME_ATTRIB(SessionNotOnOrAfter,SESSIONNOTONORAFTER,NULL);
933 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
937 class SAML_DLLLOCAL ActionImpl : public virtual Action,
938 public AbstractSimpleElement,
939 public AbstractDOMCachingXMLObject,
940 public AbstractXMLObjectMarshaller,
941 public AbstractXMLObjectUnmarshaller
944 virtual ~ActionImpl() {
945 XMLString::release(&m_Namespace);
948 ActionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
949 : AbstractXMLObject(nsURI, localName, prefix, schemaType), m_Namespace(NULL) {
952 ActionImpl(const ActionImpl& src)
953 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
954 setNamespace(src.getNamespace());
957 IMPL_XMLOBJECT_CLONE(Action);
958 IMPL_STRING_ATTRIB(Namespace);
961 void marshallAttributes(DOMElement* domElement) const {
962 MARSHALL_STRING_ATTRIB(Namespace,NAMESPACE,NULL);
965 void processAttribute(const DOMAttr* attribute) {
966 PROC_STRING_ATTRIB(Namespace,NAMESPACE,NULL);
967 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
971 class SAML_DLLLOCAL EvidenceImpl : public virtual Evidence,
972 public AbstractComplexElement,
973 public AbstractDOMCachingXMLObject,
974 public AbstractXMLObjectMarshaller,
975 public AbstractXMLObjectUnmarshaller
978 virtual ~EvidenceImpl() {}
980 EvidenceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
981 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
984 EvidenceImpl(const EvidenceImpl& src)
985 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
986 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
988 AssertionIDRef* ref=dynamic_cast<AssertionIDRef*>(*i);
990 getAssertionIDRefs().push_back(ref->cloneAssertionIDRef());
994 AssertionURIRef* uri=dynamic_cast<AssertionURIRef*>(*i);
996 getAssertionURIRefs().push_back(uri->cloneAssertionURIRef());
1000 Assertion* assertion=dynamic_cast<Assertion*>(*i);
1002 getAssertions().push_back(assertion->cloneAssertion());
1006 EncryptedAssertion* enc=dynamic_cast<EncryptedAssertion*>(*i);
1008 getEncryptedAssertions().push_back(enc->cloneEncryptedAssertion());
1015 IMPL_XMLOBJECT_CLONE(Evidence);
1016 IMPL_TYPED_CHILDREN(AssertionIDRef,m_children.end());
1017 IMPL_TYPED_CHILDREN(AssertionURIRef,m_children.end());
1018 IMPL_TYPED_CHILDREN(Assertion,m_children.end());
1019 IMPL_TYPED_CHILDREN(EncryptedAssertion,m_children.end());
1022 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1023 PROC_TYPED_CHILDREN(AssertionIDRef,SAML20_NS,false);
1024 PROC_TYPED_CHILDREN(AssertionURIRef,SAML20_NS,false);
1025 PROC_TYPED_CHILDREN(Assertion,SAML20_NS,false);
1026 PROC_TYPED_CHILDREN(EncryptedAssertion,SAML20_NS,false);
1027 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1031 class SAML_DLLLOCAL AuthzDecisionStatementImpl : public virtual AuthzDecisionStatement,
1032 public AbstractComplexElement,
1033 public AbstractDOMCachingXMLObject,
1034 public AbstractXMLObjectMarshaller,
1035 public AbstractXMLObjectUnmarshaller
1041 m_children.push_back(NULL);
1042 m_pos_Evidence=m_children.begin();
1045 virtual ~AuthzDecisionStatementImpl() {
1046 XMLString::release(&m_Resource);
1047 XMLString::release(&m_Decision);
1050 AuthzDecisionStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1051 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1055 AuthzDecisionStatementImpl(const AuthzDecisionStatementImpl& src)
1056 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
1058 setResource(src.getResource());
1059 setDecision(src.getDecision());
1060 if (src.getEvidence())
1061 setEvidence(src.getEvidence()->cloneEvidence());
1062 VectorOf(Action) v=getActions();
1063 for (vector<Action*>::const_iterator i=src.m_Actions.begin(); i!=src.m_Actions.end(); i++) {
1065 v.push_back((*i)->cloneAction());
1070 IMPL_XMLOBJECT_CLONE(AuthzDecisionStatement);
1071 Statement* cloneStatement() const {
1072 return cloneAuthzDecisionStatement();
1074 IMPL_STRING_ATTRIB(Resource);
1075 IMPL_STRING_ATTRIB(Decision);
1076 IMPL_TYPED_CHILD(Evidence);
1077 IMPL_TYPED_CHILDREN(Action, m_pos_Evidence);
1080 void marshallAttributes(DOMElement* domElement) const {
1081 MARSHALL_STRING_ATTRIB(Resource,RESOURCE,NULL);
1082 MARSHALL_STRING_ATTRIB(Decision,DECISION,NULL);
1085 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1086 PROC_TYPED_CHILD(Evidence,SAML20_NS,false);
1087 PROC_TYPED_CHILDREN(Action,SAML20_NS,false);
1088 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1091 void processAttribute(const DOMAttr* attribute) {
1092 PROC_STRING_ATTRIB(Resource,RESOURCE,NULL);
1093 PROC_STRING_ATTRIB(Decision,DECISION,NULL);
1094 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
1098 class SAML_DLLLOCAL AttributeValueImpl : public virtual AttributeValue, public AnyElementImpl
1101 virtual ~AttributeValueImpl() {}
1103 AttributeValueImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1104 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1107 AttributeValueImpl(const AttributeValueImpl& src) : AnyElementImpl(src) {
1110 IMPL_XMLOBJECT_CLONE(AttributeValue);
1114 class SAML_DLLLOCAL AttributeImpl : public virtual Attribute,
1115 public AbstractComplexElement,
1116 public AbstractAttributeExtensibleXMLObject,
1117 public AbstractDOMCachingXMLObject,
1118 public AbstractXMLObjectMarshaller,
1119 public AbstractXMLObjectUnmarshaller
1122 m_Name=m_NameFormat=m_FriendlyName=NULL;
1125 virtual ~AttributeImpl() {
1126 XMLString::release(&m_Name);
1127 XMLString::release(&m_NameFormat);
1128 XMLString::release(&m_FriendlyName);
1131 AttributeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1132 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1136 AttributeImpl(const AttributeImpl& src)
1137 : AbstractXMLObject(src), AbstractComplexElement(src),
1138 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
1140 setName(src.getName());
1141 setNameFormat(src.getNameFormat());
1142 setFriendlyName(src.getFriendlyName());
1143 VectorOf(XMLObject) v=getAttributeValues();
1144 for (vector<XMLObject*>::const_iterator i=src.m_AttributeValues.begin(); i!=src.m_AttributeValues.end(); i++) {
1146 v.push_back((*i)->clone());
1151 IMPL_XMLOBJECT_CLONE(Attribute);
1152 IMPL_STRING_ATTRIB(Name);
1153 IMPL_STRING_ATTRIB(NameFormat);
1154 IMPL_STRING_ATTRIB(FriendlyName);
1155 IMPL_XMLOBJECT_CHILDREN(AttributeValue,m_children.end());
1157 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
1158 if (!qualifiedName.hasNamespaceURI()) {
1159 if (XMLString::equals(qualifiedName.getLocalPart(),NAME_ATTRIB_NAME)) {
1163 else if (XMLString::equals(qualifiedName.getLocalPart(),NAMEFORMAT_ATTRIB_NAME)) {
1164 setNameFormat(value);
1167 else if (XMLString::equals(qualifiedName.getLocalPart(),FRIENDLYNAME_ATTRIB_NAME)) {
1168 setFriendlyName(value);
1172 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
1176 void marshallAttributes(DOMElement* domElement) const {
1177 MARSHALL_STRING_ATTRIB(Name,NAME,NULL);
1178 MARSHALL_STRING_ATTRIB(NameFormat,NAMEFORMAT,NULL);
1179 MARSHALL_STRING_ATTRIB(FriendlyName,FRIENDLYNAME,NULL);
1180 marshallExtensionAttributes(domElement);
1183 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1184 getAttributeValues().push_back(childXMLObject);
1187 void processAttribute(const DOMAttr* attribute) {
1188 unmarshallExtensionAttribute(attribute);
1192 //TODO unit test for this
1193 class SAML_DLLLOCAL EncryptedAttributeImpl : public virtual EncryptedAttribute, public EncryptedElementTypeImpl
1196 virtual ~EncryptedAttributeImpl() {}
1198 EncryptedAttributeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1199 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1201 EncryptedAttributeImpl(const EncryptedAttributeImpl& src) : AbstractXMLObject(src), EncryptedElementTypeImpl(src) {}
1203 IMPL_XMLOBJECT_CLONE(EncryptedAttribute);
1204 EncryptedElementType* cloneEncryptedElementType() const {
1205 return new EncryptedAttributeImpl(*this);
1209 class SAML_DLLLOCAL AttributeStatementImpl : public virtual AttributeStatement,
1210 public AbstractComplexElement,
1211 public AbstractDOMCachingXMLObject,
1212 public AbstractXMLObjectMarshaller,
1213 public AbstractXMLObjectUnmarshaller
1216 virtual ~AttributeStatementImpl() {}
1218 AttributeStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1219 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1222 AttributeStatementImpl(const AttributeStatementImpl& src)
1223 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
1224 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
1226 Attribute* attribute=dynamic_cast<Attribute*>(*i);
1228 getAttributes().push_back(attribute->cloneAttribute());
1232 EncryptedAttribute* enc=dynamic_cast<EncryptedAttribute*>(*i);
1234 getEncryptedAttributes().push_back(enc->cloneEncryptedAttribute());
1241 IMPL_XMLOBJECT_CLONE(AttributeStatement);
1242 Statement* cloneStatement() const {
1243 return cloneAttributeStatement();
1245 IMPL_TYPED_CHILDREN(Attribute, m_children.end());
1246 IMPL_TYPED_CHILDREN(EncryptedAttribute, m_children.end());
1249 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1250 PROC_TYPED_CHILDREN(Attribute,SAML20_NS,false);
1251 PROC_TYPED_CHILDREN(EncryptedAttribute,SAML20_NS,false);
1252 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1256 class SAML_DLLLOCAL AdviceImpl : public virtual Advice,
1257 public AbstractComplexElement,
1258 public AbstractDOMCachingXMLObject,
1259 public AbstractXMLObjectMarshaller,
1260 public AbstractXMLObjectUnmarshaller
1263 virtual ~AdviceImpl() {}
1265 AdviceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1266 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1269 AdviceImpl(const AdviceImpl& src)
1270 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
1271 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
1273 AssertionIDRef* ref=dynamic_cast<AssertionIDRef*>(*i);
1275 getAssertionIDRefs().push_back(ref->cloneAssertionIDRef());
1279 AssertionURIRef* uri=dynamic_cast<AssertionURIRef*>(*i);
1281 getAssertionURIRefs().push_back(uri->cloneAssertionURIRef());
1285 Assertion* assertion=dynamic_cast<Assertion*>(*i);
1287 getAssertions().push_back(assertion->cloneAssertion());
1291 EncryptedAssertion* enc=dynamic_cast<EncryptedAssertion*>(*i);
1293 getEncryptedAssertions().push_back(enc->cloneEncryptedAssertion());
1297 getUnknownXMLObjects().push_back((*i)->clone());
1302 IMPL_XMLOBJECT_CLONE(Advice);
1303 IMPL_TYPED_CHILDREN(AssertionIDRef,m_children.end());
1304 IMPL_TYPED_CHILDREN(AssertionURIRef,m_children.end());
1305 IMPL_TYPED_CHILDREN(Assertion,m_children.end());
1306 IMPL_TYPED_CHILDREN(EncryptedAssertion,m_children.end());
1307 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
1310 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1311 PROC_TYPED_CHILDREN(AssertionIDRef,SAML20_NS,false);
1312 PROC_TYPED_CHILDREN(AssertionURIRef,SAML20_NS,false);
1313 PROC_TYPED_CHILDREN(Assertion,SAML20_NS,false);
1314 PROC_TYPED_CHILDREN(EncryptedAssertion,SAML20_NS,false);
1317 const XMLCh* nsURI=root->getNamespaceURI();
1318 if (!XMLString::equals(nsURI,SAML20_NS) && nsURI && *nsURI) {
1319 getUnknownXMLObjects().push_back(childXMLObject);
1323 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1327 //TODO unit test for this
1328 class SAML_DLLLOCAL EncryptedAssertionImpl : public virtual EncryptedAssertion, public EncryptedElementTypeImpl
1331 virtual ~EncryptedAssertionImpl() {}
1333 EncryptedAssertionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1334 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1336 EncryptedAssertionImpl(const EncryptedAssertionImpl& src) : AbstractXMLObject(src), EncryptedElementTypeImpl(src) {}
1338 IMPL_XMLOBJECT_CLONE(EncryptedAssertion);
1339 EncryptedElementType* cloneEncryptedElementType() const {
1340 return new EncryptedAssertionImpl(*this);
1344 class SAML_DLLLOCAL AssertionImpl : public virtual Assertion,
1345 public AbstractComplexElement,
1346 public AbstractDOMCachingXMLObject,
1347 public AbstractXMLObjectMarshaller,
1348 public AbstractXMLObjectUnmarshaller
1353 m_IssueInstant=NULL;
1359 m_children.push_back(NULL);
1360 m_children.push_back(NULL);
1361 m_children.push_back(NULL);
1362 m_children.push_back(NULL);
1363 m_children.push_back(NULL);
1364 m_pos_Issuer=m_children.begin();
1365 m_pos_Signature=m_pos_Issuer;
1367 m_pos_Subject=m_pos_Signature;
1369 m_pos_Conditions=m_pos_Subject;
1371 m_pos_Advice=m_pos_Conditions;
1375 virtual ~AssertionImpl() {
1376 XMLString::release(&m_ID);
1377 XMLString::release(&m_Version);
1378 delete m_IssueInstant;
1381 AssertionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1382 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1386 AssertionImpl(const AssertionImpl& src)
1387 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
1389 setVersion(src.getVersion());
1391 setIssueInstant(src.getIssueInstant());
1392 if (src.getIssuer())
1393 setIssuer(src.getIssuer()->cloneIssuer());
1394 if (src.getSignature())
1395 setSignature(src.getSignature()->cloneSignature());
1396 if (src.getSubject())
1397 setSubject(src.getSubject()->cloneSubject());
1398 if (src.getConditions())
1399 setConditions(src.getConditions()->cloneConditions());
1400 if (src.getAdvice())
1401 setAdvice(src.getAdvice()->cloneAdvice());
1402 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
1404 AuthnStatement* authst=dynamic_cast<AuthnStatement*>(*i);
1406 getAuthnStatements().push_back(authst->cloneAuthnStatement());
1410 AttributeStatement* attst=dynamic_cast<AttributeStatement*>(*i);
1412 getAttributeStatements().push_back(attst->cloneAttributeStatement());
1416 AuthzDecisionStatement* authzst=dynamic_cast<AuthzDecisionStatement*>(*i);
1418 getAuthzDecisionStatements().push_back(authzst->cloneAuthzDecisionStatement());
1422 Statement* st=dynamic_cast<Statement*>(*i);
1424 getStatements().push_back(st->cloneStatement());
1431 //IMPL_TYPED_CHILD(Signature);
1432 // Need customized setter.
1434 Signature* m_Signature;
1435 list<XMLObject*>::iterator m_pos_Signature;
1437 Signature* getSignature() const {
1441 void setSignature(Signature* sig) {
1442 prepareForAssignment(m_Signature,sig);
1443 *m_pos_Signature=m_Signature=sig;
1444 // Sync content reference back up.
1446 m_Signature->setContentReference(new opensaml::ContentReference(*this));
1449 IMPL_XMLOBJECT_CLONE(Assertion);
1450 IMPL_STRING_ATTRIB(Version);
1452 IMPL_DATETIME_ATTRIB(IssueInstant,0);
1453 IMPL_TYPED_CHILD(Issuer);
1454 IMPL_TYPED_CHILD(Subject);
1455 IMPL_TYPED_CHILD(Conditions);
1456 IMPL_TYPED_CHILD(Advice);
1457 IMPL_TYPED_CHILDREN(Statement, m_children.end());
1458 IMPL_TYPED_CHILDREN(AuthnStatement, m_children.end());
1459 IMPL_TYPED_CHILDREN(AttributeStatement, m_children.end());
1460 IMPL_TYPED_CHILDREN(AuthzDecisionStatement, m_children.end());
1463 void marshallAttributes(DOMElement* domElement) const {
1465 const_cast<AssertionImpl*>(this)->m_Version=XMLString::transcode("2.0");
1466 MARSHALL_STRING_ATTRIB(Version,VER,NULL);
1468 const_cast<AssertionImpl*>(this)->m_ID=SAMLConfig::getConfig().generateIdentifier();
1469 MARSHALL_ID_ATTRIB(ID,ID,NULL);
1470 if (!m_IssueInstant) {
1471 const_cast<AssertionImpl*>(this)->m_IssueInstantEpoch=time(NULL);
1472 const_cast<AssertionImpl*>(this)->m_IssueInstant=new DateTime(m_IssueInstantEpoch);
1474 MARSHALL_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,NULL);
1477 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1478 PROC_TYPED_CHILD(Issuer,SAML20_NS,false);
1479 PROC_TYPED_CHILD(Signature,XMLSIG_NS,false);
1480 PROC_TYPED_CHILD(Subject,SAML20_NS,false);
1481 PROC_TYPED_CHILD(Conditions,SAML20_NS,false);
1482 PROC_TYPED_CHILD(Advice,SAML20_NS,false);
1483 PROC_TYPED_CHILDREN(AuthnStatement,SAML20_NS,false);
1484 PROC_TYPED_CHILDREN(AttributeStatement,SAML20_NS,false);
1485 PROC_TYPED_CHILDREN(AuthzDecisionStatement,SAML20_NS,false);
1486 PROC_TYPED_CHILDREN(Statement,SAML20_NS,false);
1487 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1490 void processAttribute(const DOMAttr* attribute) {
1491 PROC_STRING_ATTRIB(Version,VER,NULL);
1492 PROC_ID_ATTRIB(ID,ID,NULL);
1493 PROC_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,NULL);
1494 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
1501 #if defined (_MSC_VER)
1502 #pragma warning( pop )
1505 // Builder Implementations
1507 IMPL_XMLOBJECTBUILDER(Action);
1508 IMPL_XMLOBJECTBUILDER(Advice);
1509 IMPL_XMLOBJECTBUILDER(Assertion);
1510 IMPL_XMLOBJECTBUILDER(AssertionIDRef);
1511 IMPL_XMLOBJECTBUILDER(AssertionURIRef);
1512 IMPL_XMLOBJECTBUILDER(Attribute);
1513 IMPL_XMLOBJECTBUILDER(AttributeStatement);
1514 IMPL_XMLOBJECTBUILDER(AttributeValue);
1515 IMPL_XMLOBJECTBUILDER(Audience);
1516 IMPL_XMLOBJECTBUILDER(AudienceRestriction);
1517 IMPL_XMLOBJECTBUILDER(AuthenticatingAuthority);
1518 IMPL_XMLOBJECTBUILDER(AuthnContext);
1519 IMPL_XMLOBJECTBUILDER(AuthnContextClassRef);
1520 IMPL_XMLOBJECTBUILDER(AuthnContextDecl);
1521 IMPL_XMLOBJECTBUILDER(AuthnContextDeclRef);
1522 IMPL_XMLOBJECTBUILDER(AuthnStatement);
1523 IMPL_XMLOBJECTBUILDER(AuthzDecisionStatement);
1524 IMPL_XMLOBJECTBUILDER(Conditions);
1525 IMPL_XMLOBJECTBUILDER(EncryptedAssertion);
1526 IMPL_XMLOBJECTBUILDER(EncryptedAttribute);
1527 IMPL_XMLOBJECTBUILDER(EncryptedID);
1528 IMPL_XMLOBJECTBUILDER(Evidence);
1529 IMPL_XMLOBJECTBUILDER(Issuer);
1530 IMPL_XMLOBJECTBUILDER(KeyInfoConfirmationDataType);
1531 IMPL_XMLOBJECTBUILDER(NameID);
1532 IMPL_XMLOBJECTBUILDER(NameIDType);
1533 IMPL_XMLOBJECTBUILDER(OneTimeUse);
1534 IMPL_XMLOBJECTBUILDER(ProxyRestriction);
1535 IMPL_XMLOBJECTBUILDER(Subject);
1536 IMPL_XMLOBJECTBUILDER(SubjectConfirmation);
1537 IMPL_XMLOBJECTBUILDER(SubjectConfirmationData);
1538 IMPL_XMLOBJECTBUILDER(SubjectLocality);
1541 const XMLCh Action::LOCAL_NAME[] = UNICODE_LITERAL_6(A,c,t,i,o,n);
1542 const XMLCh Action::TYPE_NAME[] = UNICODE_LITERAL_10(A,c,t,i,o,n,T,y,p,e);
1543 const XMLCh Action::NAMESPACE_ATTRIB_NAME[] = UNICODE_LITERAL_9(N,a,m,e,s,p,a,c,e);
1544 const XMLCh Advice::LOCAL_NAME[] = UNICODE_LITERAL_6(A,d,v,i,c,e);
1545 const XMLCh Advice::TYPE_NAME[] = UNICODE_LITERAL_10(A,d,v,i,c,e,T,y,p,e);
1546 const XMLCh Assertion::LOCAL_NAME[] = UNICODE_LITERAL_9(A,s,s,e,r,t,i,o,n);
1547 const XMLCh Assertion::TYPE_NAME[] = UNICODE_LITERAL_13(A,s,s,e,r,t,i,o,n,T,y,p,e);
1548 const XMLCh Assertion::VER_ATTRIB_NAME[] = UNICODE_LITERAL_7(V,e,r,s,i,o,n);
1549 const XMLCh Assertion::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
1550 const XMLCh Assertion::ISSUEINSTANT_ATTRIB_NAME[] = UNICODE_LITERAL_12(I,s,s,u,e,I,n,s,t,a,n,t);
1551 const XMLCh AssertionIDRef::LOCAL_NAME[] = UNICODE_LITERAL_14(A,s,s,e,r,t,i,o,n,I,D,R,e,f);
1552 const XMLCh AssertionURIRef::LOCAL_NAME[] = UNICODE_LITERAL_15(A,s,s,e,r,t,i,o,n,U,R,I,R,e,f);
1553 const XMLCh Attribute::LOCAL_NAME[] = UNICODE_LITERAL_9(A,t,t,r,i,b,u,t,e);
1554 const XMLCh Attribute::TYPE_NAME[] = UNICODE_LITERAL_13(A,t,t,r,i,b,u,t,e,T,y,p,e);
1555 const XMLCh Attribute::NAME_ATTRIB_NAME[] = UNICODE_LITERAL_4(N,a,m,e);
1556 const XMLCh Attribute::NAMEFORMAT_ATTRIB_NAME[] = UNICODE_LITERAL_10(N,a,m,e,F,o,r,m,a,t);
1557 const XMLCh Attribute::FRIENDLYNAME_ATTRIB_NAME[] = UNICODE_LITERAL_12(F,r,i,e,n,d,l,y,N,a,m,e);
1558 const XMLCh AttributeStatement::LOCAL_NAME[] = UNICODE_LITERAL_18(A,t,t,r,i,b,u,t,e,S,t,a,t,e,m,e,n,t);
1559 const XMLCh AttributeStatement::TYPE_NAME[] = UNICODE_LITERAL_22(A,t,t,r,i,b,u,t,e,S,t,a,t,e,m,e,n,t,T,y,p,e);
1560 const XMLCh AttributeValue::LOCAL_NAME[] = UNICODE_LITERAL_14(A,t,t,r,i,b,u,t,e,V,a,l,u,e);
1561 const XMLCh Audience::LOCAL_NAME[] = UNICODE_LITERAL_8(A,u,d,i,e,n,c,e);
1562 const XMLCh AudienceRestriction::LOCAL_NAME[] = UNICODE_LITERAL_19(A,u,d,i,e,n,c,e,R,e,s,t,r,i,c,t,i,o,n);
1563 const XMLCh AudienceRestriction::TYPE_NAME[] = UNICODE_LITERAL_23(A,u,d,i,e,n,c,e,R,e,s,t,r,i,c,t,i,o,n,T,y,p,e);
1564 const XMLCh AuthenticatingAuthority::LOCAL_NAME[] = UNICODE_LITERAL_23(A,u,t,h,e,n,t,i,c,a,t,i,n,g,A,u,t,h,o,r,i,t,y);
1565 const XMLCh AuthnContext::LOCAL_NAME[] = UNICODE_LITERAL_12(A,u,t,h,n,C,o,n,t,e,x,t);
1566 const XMLCh AuthnContext::TYPE_NAME[] = UNICODE_LITERAL_16(A,u,t,h,n,C,o,n,t,e,x,t,T,y,p,e);
1567 const XMLCh AuthnContextClassRef::LOCAL_NAME[] = UNICODE_LITERAL_20(A,u,t,h,n,C,o,n,t,e,x,t,C,l,a,s,s,R,e,f);
1568 const XMLCh AuthnContextDecl::LOCAL_NAME[] = UNICODE_LITERAL_16(A,u,t,h,n,C,o,n,t,e,x,t,D,e,c,l);
1569 const XMLCh AuthnContextDeclRef::LOCAL_NAME[] = UNICODE_LITERAL_19(A,u,t,h,n,C,o,n,t,e,x,t,D,e,c,l,R,e,f);
1570 const XMLCh AuthnStatement::LOCAL_NAME[] = UNICODE_LITERAL_14(A,u,t,h,n,S,t,a,t,e,m,e,n,t);
1571 const XMLCh AuthnStatement::TYPE_NAME[] = UNICODE_LITERAL_18(A,u,t,h,n,S,t,a,t,e,m,e,n,t,T,y,p,e);
1572 const XMLCh AuthnStatement::AUTHNINSTANT_ATTRIB_NAME[] = UNICODE_LITERAL_12(A,u,t,h,n,I,n,s,t,a,n,t);
1573 const XMLCh AuthnStatement::SESSIONINDEX_ATTRIB_NAME[] = UNICODE_LITERAL_12(S,e,s,s,i,o,n,I,n,d,e,x);
1574 const XMLCh AuthnStatement::SESSIONNOTONORAFTER_ATTRIB_NAME[] = UNICODE_LITERAL_19(S,e,s,s,i,o,n,N,o,t,O,n,O,r,A,f,t,e,r);
1575 const XMLCh AuthzDecisionStatement::LOCAL_NAME[] = UNICODE_LITERAL_22(A,u,t,h,z,D,e,c,i,s,i,o,n,S,t,a,t,e,m,e,n,t);
1576 const XMLCh AuthzDecisionStatement::TYPE_NAME[] = UNICODE_LITERAL_26(A,u,t,h,z,D,e,c,i,s,i,o,n,S,t,a,t,e,m,e,n,t,T,y,p,e);
1577 const XMLCh AuthzDecisionStatement::RESOURCE_ATTRIB_NAME[] = UNICODE_LITERAL_8(R,e,s,o,u,r,c,e);
1578 const XMLCh AuthzDecisionStatement::DECISION_ATTRIB_NAME[] = UNICODE_LITERAL_8(D,e,c,i,s,i,o,n);
1579 const XMLCh AuthzDecisionStatement::DECISION_PERMIT[] = UNICODE_LITERAL_6(P,e,r,m,i,t);
1580 const XMLCh AuthzDecisionStatement::DECISION_DENY[] = UNICODE_LITERAL_4(D,e,n,y);
1581 const XMLCh AuthzDecisionStatement::DECISION_INDETERMINATE[] = UNICODE_LITERAL_13(I,n,d,e,t,e,r,m,i,n,a,t,e);
1582 const XMLCh BaseID::LOCAL_NAME[] = UNICODE_LITERAL_6(B,a,s,e,I,D);
1583 const XMLCh BaseID::NAMEQUALIFIER_ATTRIB_NAME[] = UNICODE_LITERAL_13(N,a,m,e,Q,u,a,l,i,f,i,e,r);
1584 const XMLCh BaseID::SPNAMEQUALIFIER_ATTRIB_NAME[] = UNICODE_LITERAL_15(S,P,N,a,m,e,Q,u,a,l,i,f,i,e,r);
1585 const XMLCh Condition::LOCAL_NAME[] = UNICODE_LITERAL_9(C,o,n,d,i,t,i,o,n);
1586 const XMLCh Conditions::LOCAL_NAME[] = UNICODE_LITERAL_10(C,o,n,d,i,t,i,o,n,s);
1587 const XMLCh Conditions::TYPE_NAME[] = UNICODE_LITERAL_14(C,o,n,d,i,t,i,o,n,s,T,y,p,e);
1588 const XMLCh Conditions::NOTBEFORE_ATTRIB_NAME[] = UNICODE_LITERAL_9(N,o,t,B,e,f,o,r,e);
1589 const XMLCh Conditions::NOTONORAFTER_ATTRIB_NAME[] =UNICODE_LITERAL_12(N,o,t,O,n,O,r,A,f,t,e,r);
1590 const XMLCh EncryptedAssertion::LOCAL_NAME[] = UNICODE_LITERAL_18(E,n,c,r,y,p,t,e,d,A,s,s,e,r,t,i,o,n);
1591 const XMLCh EncryptedAttribute::LOCAL_NAME[] = UNICODE_LITERAL_18(E,n,c,r,y,p,t,e,d,A,t,t,r,i,b,u,t,e);
1592 const XMLCh EncryptedElementType::LOCAL_NAME[] = {chNull};
1593 const XMLCh EncryptedElementType::TYPE_NAME[] = UNICODE_LITERAL_20(E,n,c,r,y,p,t,e,d,E,l,e,m,e,n,t,T,y,p,e);
1594 const XMLCh EncryptedID::LOCAL_NAME[] = UNICODE_LITERAL_11(E,n,c,r,y,p,t,e,d,I,D);
1595 const XMLCh Evidence::LOCAL_NAME[] = UNICODE_LITERAL_8(E,v,i,d,e,n,c,e);
1596 const XMLCh Evidence::TYPE_NAME[] = UNICODE_LITERAL_12(E,v,i,d,e,n,c,e,T,y,p,e);
1597 const XMLCh Issuer::LOCAL_NAME[] = UNICODE_LITERAL_6(I,s,s,u,e,r);
1598 const XMLCh KeyInfoConfirmationDataType::LOCAL_NAME[] = UNICODE_LITERAL_23(S,u,b,j,e,c,t,C,o,n,f,i,r,m,a,t,i,o,n,D,a,t,a);
1599 const XMLCh KeyInfoConfirmationDataType::TYPE_NAME[] = UNICODE_LITERAL_27(K,e,y,I,n,f,o,C,o,n,f,i,r,m,a,t,i,o,n,D,a,t,a,T,y,p,e);
1600 const XMLCh NameID::LOCAL_NAME[] = UNICODE_LITERAL_6(N,a,m,e,I,D);
1601 const XMLCh NameIDType::LOCAL_NAME[] = {chNull};
1602 const XMLCh NameIDType::TYPE_NAME[] = UNICODE_LITERAL_10(N,a,m,e,I,D,T,y,p,e);
1603 const XMLCh NameIDType::NAMEQUALIFIER_ATTRIB_NAME[] = UNICODE_LITERAL_13(N,a,m,e,Q,u,a,l,i,f,i,e,r);
1604 const XMLCh NameIDType::SPNAMEQUALIFIER_ATTRIB_NAME[] = UNICODE_LITERAL_15(S,P,N,a,m,e,Q,u,a,l,i,f,i,e,r);
1605 const XMLCh NameIDType::FORMAT_ATTRIB_NAME[] = UNICODE_LITERAL_6(F,o,r,m,a,t);
1606 const XMLCh NameIDType::SPPROVIDEDID_ATTRIB_NAME[] = UNICODE_LITERAL_12(S,P,P,r,o,v,i,d,e,d,I,D);
1607 const XMLCh OneTimeUse::LOCAL_NAME[] = UNICODE_LITERAL_10(O,n,e,T,i,m,e,U,s,e);
1608 const XMLCh OneTimeUse::TYPE_NAME[] = UNICODE_LITERAL_14(O,n,e,T,i,m,e,U,s,e,T,y,p,e);
1609 const XMLCh ProxyRestriction::LOCAL_NAME[] = UNICODE_LITERAL_16(P,r,o,x,y,R,e,s,t,r,i,c,t,i,o,n);
1610 const XMLCh ProxyRestriction::TYPE_NAME[] = UNICODE_LITERAL_20(P,r,o,x,y,R,e,s,t,r,i,c,t,i,o,n,T,y,p,e);
1611 const XMLCh ProxyRestriction::COUNT_ATTRIB_NAME[] = UNICODE_LITERAL_5(C,o,u,n,t);
1612 const XMLCh Statement::LOCAL_NAME[] = UNICODE_LITERAL_9(S,t,a,t,e,m,e,n,t);
1613 const XMLCh Subject::LOCAL_NAME[] = UNICODE_LITERAL_7(S,u,b,j,e,c,t);
1614 const XMLCh Subject::TYPE_NAME[] = UNICODE_LITERAL_11(S,u,b,j,e,c,t,T,y,p,e);
1615 const XMLCh SubjectConfirmation::LOCAL_NAME[] = UNICODE_LITERAL_19(S,u,b,j,e,c,t,C,o,n,f,i,r,m,a,t,i,o,n);
1616 const XMLCh SubjectConfirmation::TYPE_NAME[] = UNICODE_LITERAL_23(S,u,b,j,e,c,t,C,o,n,f,i,r,m,a,t,i,o,n,T,y,p,e);
1617 const XMLCh SubjectConfirmation::METHOD_ATTRIB_NAME[] = UNICODE_LITERAL_6(M,e,t,h,o,d);
1618 const XMLCh SubjectConfirmationData::LOCAL_NAME[] = UNICODE_LITERAL_23(S,u,b,j,e,c,t,C,o,n,f,i,r,m,a,t,i,o,n,D,a,t,a);
1619 const XMLCh SubjectConfirmationDataType::NOTBEFORE_ATTRIB_NAME[] = UNICODE_LITERAL_9(N,o,t,B,e,f,o,r,e);
1620 const XMLCh SubjectConfirmationDataType::NOTONORAFTER_ATTRIB_NAME[] = UNICODE_LITERAL_12(N,o,t,O,n,O,r,A,f,t,e,r);
1621 const XMLCh SubjectConfirmationDataType::INRESPONSETO_ATTRIB_NAME[] = UNICODE_LITERAL_12(I,n,R,e,s,p,o,n,s,e,T,o);
1622 const XMLCh SubjectConfirmationDataType::RECIPIENT_ATTRIB_NAME[] = UNICODE_LITERAL_9(R,e,c,i,p,i,e,n,t);
1623 const XMLCh SubjectConfirmationDataType::ADDRESS_ATTRIB_NAME[] = UNICODE_LITERAL_7(A,d,d,r,e,s,s);
1624 const XMLCh SubjectLocality::LOCAL_NAME[] = UNICODE_LITERAL_15(S,u,b,j,e,c,t,L,o,c,a,l,i,t,y);
1625 const XMLCh SubjectLocality::TYPE_NAME[] = UNICODE_LITERAL_19(S,u,b,j,e,c,t,L,o,c,a,l,i,t,y,T,y,p,e);
1626 const XMLCh SubjectLocality::ADDRESS_ATTRIB_NAME[] =UNICODE_LITERAL_7(A,d,d,r,e,s,s);
1627 const XMLCh SubjectLocality::DNSNAME_ATTRIB_NAME[] =UNICODE_LITERAL_7(D,N,S,N,a,m,e);
1629 const XMLCh NameIDType::UNSPECIFIED[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified
1630 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1631 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1632 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1633 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1634 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1635 chLatin_u, chLatin_n, chLatin_s, chLatin_p, chLatin_e, chLatin_c, chLatin_i, chLatin_f, chLatin_i, chLatin_e, chLatin_d, chNull
1638 const XMLCh NameIDType::EMAIL[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress
1639 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1640 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1641 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1642 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1643 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1644 chLatin_e, chLatin_m, chLatin_a, chLatin_i, chLatin_l, chLatin_A, chLatin_d, chLatin_d, chLatin_r, chLatin_e, chLatin_s, chLatin_s, chNull
1647 const XMLCh NameIDType::X509_SUBJECT[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName
1648 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1649 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1650 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1651 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1652 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1653 chLatin_X, chDigit_5, chDigit_0, chDigit_9, chLatin_S, chLatin_u, chLatin_b, chLatin_j, chLatin_e, chLatin_c, chLatin_t,
1654 chLatin_N, chLatin_a, chLatin_m, chLatin_e, chNull
1657 const XMLCh NameIDType::WIN_DOMAIN_QUALIFIED[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName
1658 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1659 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1660 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1661 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1662 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1663 chLatin_W, chLatin_i, chLatin_n, chLatin_d, chLatin_o, chLatin_w, chLatin_s,
1664 chLatin_D, chLatin_o, chLatin_m, chLatin_a, chLatin_i, chLatin_n,
1665 chLatin_Q, chLatin_u, chLatin_a, chLatin_l, chLatin_i, chLatin_f, chLatin_i, chLatin_e, chLatin_d,
1666 chLatin_N, chLatin_a, chLatin_m, chLatin_e, chNull
1669 const XMLCh NameIDType::KERBEROS[] = // urn:oasis:names:tc:SAML:2.0:nameid-format:kerberos
1670 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1671 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1672 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1673 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1674 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1675 chLatin_k, chLatin_e, chLatin_r, chLatin_b, chLatin_e, chLatin_r, chLatin_o, chLatin_s, chNull
1678 const XMLCh NameIDType::ENTITY[] = // urn:oasis:names:tc:SAML:2.0:nameid-format:entity
1679 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1680 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1681 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1682 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1683 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1684 chLatin_e, chLatin_n, chLatin_t, chLatin_i, chLatin_t, chLatin_y, chNull
1687 const XMLCh NameIDType::PERSISTENT[] = // urn:oasis:names:tc:SAML:2.0:nameid-format:persistent
1688 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1689 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1690 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1691 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1692 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1693 chLatin_p, chLatin_e, chLatin_r, chLatin_s, chLatin_i, chLatin_s, chLatin_t, chLatin_e, chLatin_n, chLatin_t, chNull
1696 const XMLCh NameIDType::TRANSIENT[] = // urn:oasis:names:tc:SAML:2.0:nameid-format:transient
1697 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1698 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1699 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1700 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1701 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1702 chLatin_t, chLatin_r, chLatin_a, chLatin_n, chLatin_s, chLatin_i, chLatin_e, chLatin_n, chLatin_t, chNull
1705 const XMLCh SubjectConfirmation::BEARER[] = // urn:oasis:names:tc:SAML:2.0:cm:bearer
1706 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1707 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1708 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1709 chLatin_c, chLatin_m, chColon, chLatin_b, chLatin_e, chLatin_a, chLatin_r, chLatin_e, chLatin_r, chNull
1712 const XMLCh SubjectConfirmation::HOLDER_KEY[] = // urn:oasis:names:tc:SAML:2.0:cm:holder-of-key
1713 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1714 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1715 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1716 chLatin_c, chLatin_m, chColon, chLatin_h, chLatin_o, chLatin_l, chLatin_d, chLatin_e, chLatin_r, chDash,
1717 chLatin_o, chLatin_f, chDash, chLatin_k, chLatin_e, chLatin_y, chNull
1720 const XMLCh SubjectConfirmation::SENDER_VOUCHES[] = // urn:oasis:names:tc:SAML:2.0:cm:sender-vouches
1721 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1722 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1723 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1724 chLatin_c, chLatin_m, chColon, chLatin_s, chLatin_e, chLatin_n, chLatin_d, chLatin_e, chLatin_r, chDash,
1725 chLatin_v, chLatin_o, chLatin_u, chLatin_c, chLatin_h, chLatin_e, chLatin_s, chNull
1728 const XMLCh Action::RWEDC_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:rwedc
1729 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1730 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1731 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1732 chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1733 chLatin_r, chLatin_w, chLatin_e, chLatin_d, chLatin_c, chNull
1736 const XMLCh Action::RWEDC_NEG_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:rwedc-negation
1737 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1738 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1739 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1740 chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1741 chLatin_r, chLatin_w, chLatin_e, chLatin_d, chLatin_c, chDash,
1742 chLatin_n, chLatin_e, chLatin_g, chLatin_a, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chNull
1745 const XMLCh Action::GHPP_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:ghpp
1746 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1747 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1748 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1749 chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1750 chLatin_g, chLatin_h, chLatin_p, chLatin_p, chNull
1753 const XMLCh Action::UNIX_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:unix
1754 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1755 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1756 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1757 chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1758 chLatin_u, chLatin_n, chLatin_i, chLatin_x, chNull
1761 const XMLCh Attribute::UNSPECIFIED[] = // urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified
1762 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1763 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1764 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1765 chLatin_a, chLatin_t, chLatin_t, chLatin_r, chLatin_n, chLatin_a, chLatin_m, chLatin_e, chDash,
1766 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1767 chLatin_u, chLatin_n, chLatin_s, chLatin_p, chLatin_e, chLatin_c, chLatin_i, chLatin_f, chLatin_i, chLatin_e, chLatin_d, chNull
1770 const XMLCh Attribute::URI_REFERENCE[] = // urn:oasis:names:tc:SAML:2.0:attrname-format:uri
1771 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1772 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1773 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1774 chLatin_a, chLatin_t, chLatin_t, chLatin_r, chLatin_n, chLatin_a, chLatin_m, chLatin_e, chDash,
1775 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1776 chLatin_u, chLatin_r, chLatin_i, chNull
1779 const XMLCh Attribute::BASIC[] = // urn:oasis:names:tc:SAML:2.0:attrname-format:basic
1780 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1781 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1782 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1783 chLatin_a, chLatin_t, chLatin_t, chLatin_r, chLatin_n, chLatin_a, chLatin_m, chLatin_e, chDash,
1784 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1785 chLatin_b, chLatin_a, chLatin_s, chLatin_i, chLatin_c, chNull