2 * Copyright 2001-2006 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/AbstractChildlessElement.h>
29 #include <xmltooling/AbstractComplexElement.h>
30 #include <xmltooling/AbstractElementProxy.h>
31 #include <xmltooling/AbstractSimpleElement.h>
32 #include <xmltooling/encryption/Decrypter.h>
33 #include <xmltooling/impl/AnyElement.h>
34 #include <xmltooling/io/AbstractXMLObjectMarshaller.h>
35 #include <xmltooling/io/AbstractXMLObjectUnmarshaller.h>
36 #include <xmltooling/util/XMLHelper.h>
39 #include <xercesc/util/XMLUniDefs.hpp>
41 using namespace opensaml::saml2;
42 using namespace opensaml;
43 using namespace xmlencryption;
44 using namespace xmlsignature;
45 using namespace xmltooling;
48 #if defined (_MSC_VER)
49 #pragma warning( push )
50 #pragma warning( disable : 4250 4251 )
56 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AssertionIDRef);
57 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AssertionURIRef);
58 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,Audience);
59 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AuthnContextClassRef);
60 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AuthnContextDeclRef);
61 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AuthenticatingAuthority);
63 class SAML_DLLLOCAL NameIDTypeImpl : public virtual NameIDType,
64 public AbstractSimpleElement,
65 public AbstractChildlessElement,
66 public AbstractDOMCachingXMLObject,
67 public AbstractXMLObjectMarshaller,
68 public AbstractXMLObjectUnmarshaller
71 m_Format=m_SPProvidedID=m_NameQualifier=m_SPNameQualifier=NULL;
80 virtual ~NameIDTypeImpl() {
81 XMLString::release(&m_NameQualifier);
82 XMLString::release(&m_SPNameQualifier);
83 XMLString::release(&m_Format);
84 XMLString::release(&m_SPProvidedID);
87 NameIDTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
88 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
92 NameIDTypeImpl(const NameIDTypeImpl& src)
93 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
95 setNameQualifier(src.getNameQualifier());
96 setSPNameQualifier(src.getSPNameQualifier());
97 setFormat(src.getFormat());
98 setSPProvidedID(src.getSPProvidedID());
101 IMPL_XMLOBJECT_CLONE(NameIDType);
102 IMPL_STRING_ATTRIB(NameQualifier);
103 IMPL_STRING_ATTRIB(SPNameQualifier);
104 IMPL_STRING_ATTRIB(Format);
105 IMPL_STRING_ATTRIB(SPProvidedID);
106 IMPL_XMLOBJECT_CONTENT;
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), 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 XMLObject* decrypt(KeyResolver* KEKresolver, const XMLCh* recipient) const
199 if (!m_EncryptedData)
200 throw DecryptionException("No encrypted data present.");
201 Decrypter decrypter(KEKresolver, new EncryptedKeyResolver(*this, recipient));
202 DOMDocumentFragment* frag = decrypter.decryptData(m_EncryptedData);
203 if (frag->hasChildNodes() && frag->getFirstChild()==frag->getLastChild()) {
204 DOMNode* plaintext=frag->getFirstChild();
205 if (plaintext->getNodeType()==DOMNode::ELEMENT_NODE) {
206 auto_ptr<XMLObject> ret(XMLObjectBuilder::buildOneFromElement(static_cast<DOMElement*>(plaintext)));
207 ret->releaseThisAndChildrenDOM();
208 return ret.release();
212 throw DecryptionException("Decryption did not result in a single element.");
215 IMPL_XMLOBJECT_CLONE(EncryptedElementType);
216 IMPL_TYPED_FOREIGN_CHILD(EncryptedData,xmlencryption);
217 IMPL_TYPED_FOREIGN_CHILDREN(EncryptedKey,xmlencryption,m_children.end());
220 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
221 PROC_TYPED_FOREIGN_CHILD(EncryptedData,xmlencryption,XMLConstants::XMLENC_NS,false);
222 PROC_TYPED_FOREIGN_CHILDREN(EncryptedKey,xmlencryption,XMLConstants::XMLENC_NS,false);
223 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
227 //TODO unit test for this
228 class SAML_DLLLOCAL EncryptedIDImpl : public virtual EncryptedID, public EncryptedElementTypeImpl
231 virtual ~EncryptedIDImpl() {}
233 EncryptedIDImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
234 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
236 EncryptedIDImpl(const EncryptedIDImpl& src) : AbstractXMLObject(src), EncryptedElementTypeImpl(src) {}
238 IMPL_XMLOBJECT_CLONE(EncryptedID);
239 EncryptedElementType* cloneEncryptedElementType() const {
240 return new EncryptedIDImpl(*this);
244 class SAML_DLLLOCAL AudienceRestrictionImpl : public virtual AudienceRestriction,
245 public AbstractComplexElement,
246 public AbstractDOMCachingXMLObject,
247 public AbstractXMLObjectMarshaller,
248 public AbstractXMLObjectUnmarshaller
251 virtual ~AudienceRestrictionImpl() {}
253 AudienceRestrictionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
254 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
257 AudienceRestrictionImpl(const AudienceRestrictionImpl& src) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) {
258 VectorOf(Audience) v=getAudiences();
259 for (vector<Audience*>::const_iterator i=src.m_Audiences.begin(); i!=src.m_Audiences.end(); i++) {
261 v.push_back((*i)->cloneAudience());
266 IMPL_XMLOBJECT_CLONE(AudienceRestriction);
267 Condition* cloneCondition() const {
268 return cloneAudienceRestriction();
270 IMPL_TYPED_CHILDREN(Audience,m_children.end());
273 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
274 PROC_TYPED_CHILDREN(Audience,SAMLConstants::SAML20_NS,false);
275 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
279 class SAML_DLLLOCAL OneTimeUseImpl : public virtual OneTimeUse,
280 public AbstractChildlessElement,
281 public AbstractDOMCachingXMLObject,
282 public AbstractXMLObjectMarshaller,
283 public AbstractXMLObjectUnmarshaller
286 virtual ~OneTimeUseImpl() {}
288 OneTimeUseImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
289 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
292 OneTimeUseImpl(const OneTimeUseImpl& src) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) {
295 IMPL_XMLOBJECT_CLONE(OneTimeUse);
296 Condition* cloneCondition() const {
297 return cloneOneTimeUse();
301 class SAML_DLLLOCAL ProxyRestrictionImpl : public virtual ProxyRestriction,
302 public AbstractComplexElement,
303 public AbstractDOMCachingXMLObject,
304 public AbstractXMLObjectMarshaller,
305 public AbstractXMLObjectUnmarshaller
308 virtual ~ProxyRestrictionImpl() {
309 XMLString::release(&m_Count);
312 ProxyRestrictionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
313 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
317 ProxyRestrictionImpl(const ProxyRestrictionImpl& src) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) {
318 setCount(src.m_Count);
319 VectorOf(Audience) v=getAudiences();
320 for (vector<Audience*>::const_iterator i=src.m_Audiences.begin(); i!=src.m_Audiences.end(); i++) {
322 v.push_back((*i)->cloneAudience());
327 IMPL_XMLOBJECT_CLONE(ProxyRestriction);
328 Condition* cloneCondition() const {
329 return cloneProxyRestriction();
331 IMPL_TYPED_CHILDREN(Audience,m_children.end());
332 IMPL_INTEGER_ATTRIB(Count);
335 void marshallAttributes(DOMElement* domElement) const {
336 MARSHALL_INTEGER_ATTRIB(Count,COUNT,NULL);
339 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
340 PROC_TYPED_CHILDREN(Audience,SAMLConstants::SAML20_NS,false);
341 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
344 void processAttribute(const DOMAttr* attribute) {
345 PROC_INTEGER_ATTRIB(Count,COUNT,NULL);
346 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
351 class SAML_DLLLOCAL ConditionsImpl : public virtual Conditions,
352 public AbstractComplexElement,
353 public AbstractDOMCachingXMLObject,
354 public AbstractXMLObjectMarshaller,
355 public AbstractXMLObjectUnmarshaller
358 m_NotBefore=m_NotOnOrAfter=NULL;
361 virtual ~ConditionsImpl() {
363 delete m_NotOnOrAfter;
366 ConditionsImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
367 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
371 ConditionsImpl(const ConditionsImpl& src) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) {
373 setNotBefore(src.getNotBefore());
374 setNotOnOrAfter(src.getNotOnOrAfter());
376 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
378 AudienceRestriction* arc=dynamic_cast<AudienceRestriction*>(*i);
380 getAudienceRestrictions().push_back(arc->cloneAudienceRestriction());
384 OneTimeUse* dncc=dynamic_cast<OneTimeUse*>(*i);
386 getOneTimeUses().push_back(dncc->cloneOneTimeUse());
390 ProxyRestriction* prc=dynamic_cast<ProxyRestriction*>(*i);
392 getProxyRestrictions().push_back(prc->cloneProxyRestriction());
396 Condition* c=dynamic_cast<Condition*>(*i);
398 getConditions().push_back(c->cloneCondition());
405 IMPL_XMLOBJECT_CLONE(Conditions);
406 IMPL_DATETIME_ATTRIB(NotBefore,0);
407 IMPL_DATETIME_ATTRIB(NotOnOrAfter,SAMLTIME_MAX);
408 IMPL_TYPED_CHILDREN(AudienceRestriction, m_children.end());
409 IMPL_TYPED_CHILDREN(OneTimeUse,m_children.end());
410 IMPL_TYPED_CHILDREN(ProxyRestriction, m_children.end());
411 IMPL_TYPED_CHILDREN(Condition,m_children.end());
414 void marshallAttributes(DOMElement* domElement) const {
415 MARSHALL_DATETIME_ATTRIB(NotBefore,NOTBEFORE,NULL);
416 MARSHALL_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,NULL);
419 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
420 PROC_TYPED_CHILDREN(AudienceRestriction,SAMLConstants::SAML20_NS,false);
421 PROC_TYPED_CHILDREN(OneTimeUse,SAMLConstants::SAML20_NS,false);
422 PROC_TYPED_CHILDREN(ProxyRestriction,SAMLConstants::SAML20_NS,false);
423 PROC_TYPED_CHILDREN(Condition,SAMLConstants::SAML20_NS,false);
424 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
427 void processAttribute(const DOMAttr* attribute) {
428 PROC_DATETIME_ATTRIB(NotBefore,NOTBEFORE,NULL);
429 PROC_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,NULL);
430 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
434 class SAML_DLLLOCAL SubjectConfirmationDataImpl : public virtual SubjectConfirmationData, public AnyElementImpl
437 m_NotBefore=m_NotOnOrAfter=NULL;
438 m_Recipient=m_InResponseTo=m_Address=NULL;
441 virtual ~SubjectConfirmationDataImpl() {
443 delete m_NotOnOrAfter;
444 XMLString::release(&m_Recipient);
445 XMLString::release(&m_InResponseTo);
446 XMLString::release(&m_Address);
449 SubjectConfirmationDataImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
450 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
454 SubjectConfirmationDataImpl(const SubjectConfirmationDataImpl& src) : AnyElementImpl(src) {
456 setNotBefore(src.getNotBefore());
457 setNotOnOrAfter(src.getNotOnOrAfter());
458 setRecipient(src.getRecipient());
459 setInResponseTo(src.getInResponseTo());
460 setAddress(src.getAddress());
463 IMPL_XMLOBJECT_CLONE(SubjectConfirmationData);
464 IMPL_DATETIME_ATTRIB(NotBefore,0);
465 IMPL_DATETIME_ATTRIB(NotOnOrAfter,SAMLTIME_MAX);
466 IMPL_STRING_ATTRIB(Recipient);
467 IMPL_STRING_ATTRIB(InResponseTo);
468 IMPL_STRING_ATTRIB(Address);
471 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
472 if (!qualifiedName.hasNamespaceURI()) {
473 if (XMLString::equals(qualifiedName.getLocalPart(),NOTBEFORE_ATTRIB_NAME)) {
477 else if (XMLString::equals(qualifiedName.getLocalPart(),NOTONORAFTER_ATTRIB_NAME)) {
478 setNotOnOrAfter(value);
481 else if (XMLString::equals(qualifiedName.getLocalPart(),RECIPIENT_ATTRIB_NAME)) {
485 else if (XMLString::equals(qualifiedName.getLocalPart(),INRESPONSETO_ATTRIB_NAME)) {
486 setInResponseTo(value);
489 else if (XMLString::equals(qualifiedName.getLocalPart(),ADDRESS_ATTRIB_NAME)) {
494 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
498 void marshallAttributes(DOMElement* domElement) const {
499 MARSHALL_DATETIME_ATTRIB(NotBefore,NOTBEFORE,NULL);
500 MARSHALL_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,NULL);
501 MARSHALL_STRING_ATTRIB(Recipient,RECIPIENT,NULL);
502 MARSHALL_STRING_ATTRIB(InResponseTo,INRESPONSETO,NULL);
503 MARSHALL_STRING_ATTRIB(Address,ADDRESS,NULL);
504 AnyElementImpl::marshallAttributes(domElement);
507 // The processAttributes hook is handled by AnyElementImpl
510 class SAML_DLLLOCAL KeyInfoConfirmationDataTypeImpl : public virtual KeyInfoConfirmationDataType,
511 public AbstractComplexElement,
512 public AbstractAttributeExtensibleXMLObject,
513 public AbstractDOMCachingXMLObject,
514 public AbstractXMLObjectMarshaller,
515 public AbstractXMLObjectUnmarshaller
518 m_NotBefore=m_NotOnOrAfter=NULL;
519 m_Recipient=m_InResponseTo=m_Address=NULL;
522 virtual ~KeyInfoConfirmationDataTypeImpl() {
524 delete m_NotOnOrAfter;
525 XMLString::release(&m_Recipient);
526 XMLString::release(&m_InResponseTo);
527 XMLString::release(&m_Address);
530 KeyInfoConfirmationDataTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
531 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
535 KeyInfoConfirmationDataTypeImpl(const KeyInfoConfirmationDataTypeImpl& src)
536 : AbstractXMLObject(src), AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
538 setNotBefore(src.getNotBefore());
539 setNotOnOrAfter(src.getNotOnOrAfter());
540 setRecipient(src.getRecipient());
541 setInResponseTo(src.getInResponseTo());
542 setAddress(src.getAddress());
543 VectorOf(KeyInfo) v=getKeyInfos();
544 for (vector<KeyInfo*>::const_iterator i=src.m_KeyInfos.begin(); i!=src.m_KeyInfos.end(); i++) {
546 v.push_back((*i)->cloneKeyInfo());
551 IMPL_XMLOBJECT_CLONE(KeyInfoConfirmationDataType);
552 IMPL_DATETIME_ATTRIB(NotBefore,0);
553 IMPL_DATETIME_ATTRIB(NotOnOrAfter,SAMLTIME_MAX);
554 IMPL_STRING_ATTRIB(Recipient);
555 IMPL_STRING_ATTRIB(InResponseTo);
556 IMPL_STRING_ATTRIB(Address);
557 IMPL_TYPED_CHILDREN(KeyInfo,m_children.end());
560 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
561 if (!qualifiedName.hasNamespaceURI()) {
562 if (XMLString::equals(qualifiedName.getLocalPart(),NOTBEFORE_ATTRIB_NAME)) {
566 else if (XMLString::equals(qualifiedName.getLocalPart(),NOTONORAFTER_ATTRIB_NAME)) {
567 setNotOnOrAfter(value);
570 else if (XMLString::equals(qualifiedName.getLocalPart(),RECIPIENT_ATTRIB_NAME)) {
574 else if (XMLString::equals(qualifiedName.getLocalPart(),INRESPONSETO_ATTRIB_NAME)) {
575 setInResponseTo(value);
578 else if (XMLString::equals(qualifiedName.getLocalPart(),ADDRESS_ATTRIB_NAME)) {
583 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
587 void marshallAttributes(DOMElement* domElement) const {
588 MARSHALL_DATETIME_ATTRIB(NotBefore,NOTBEFORE,NULL);
589 MARSHALL_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,NULL);
590 MARSHALL_STRING_ATTRIB(Recipient,RECIPIENT,NULL);
591 MARSHALL_STRING_ATTRIB(InResponseTo,INRESPONSETO,NULL);
592 MARSHALL_STRING_ATTRIB(Address,ADDRESS,NULL);
593 marshallExtensionAttributes(domElement);
596 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
597 PROC_TYPED_CHILDREN(KeyInfo,XMLConstants::XMLSIG_NS,false);
598 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
601 void processAttribute(const DOMAttr* attribute) {
602 unmarshallExtensionAttribute(attribute);
606 class SAML_DLLLOCAL SubjectConfirmationImpl : public virtual SubjectConfirmation,
607 public AbstractComplexElement,
608 public AbstractDOMCachingXMLObject,
609 public AbstractXMLObjectMarshaller,
610 public AbstractXMLObjectUnmarshaller
617 m_SubjectConfirmationData=NULL;
618 m_KeyInfoConfirmationDataType=NULL;
619 m_children.push_back(NULL);
620 m_children.push_back(NULL);
621 m_children.push_back(NULL);
622 m_children.push_back(NULL);
623 m_pos_BaseID=m_children.begin();
624 m_pos_NameID=m_pos_BaseID;
626 m_pos_EncryptedID=m_pos_NameID;
628 m_pos_SubjectConfirmationData=m_pos_EncryptedID;
629 ++m_pos_SubjectConfirmationData;
630 m_pos_KeyInfoConfirmationDataType=m_pos_SubjectConfirmationData;
631 ++m_pos_KeyInfoConfirmationDataType;
634 virtual ~SubjectConfirmationImpl() {}
636 SubjectConfirmationImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
637 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
641 SubjectConfirmationImpl(const SubjectConfirmationImpl& src) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) {
643 setMethod(src.getMethod());
645 setBaseID(src.getBaseID()->cloneBaseID());
647 setNameID(src.getNameID()->cloneNameID());
648 if (src.getEncryptedID())
649 setEncryptedID(src.getEncryptedID()->cloneEncryptedID());
650 if (src.getSubjectConfirmationData())
651 setSubjectConfirmationData(src.getSubjectConfirmationData()->clone());
652 if (src.getKeyInfoConfirmationDataType())
653 setKeyInfoConfirmationDataType(src.getKeyInfoConfirmationDataType()->cloneKeyInfoConfirmationDataType());
656 IMPL_XMLOBJECT_CLONE(SubjectConfirmation);
657 IMPL_STRING_ATTRIB(Method);
658 IMPL_TYPED_CHILD(BaseID);
659 IMPL_TYPED_CHILD(NameID);
660 IMPL_TYPED_CHILD(EncryptedID);
661 IMPL_XMLOBJECT_CHILD(SubjectConfirmationData);
662 IMPL_TYPED_CHILD(KeyInfoConfirmationDataType);
665 void marshallAttributes(DOMElement* domElement) const {
666 MARSHALL_STRING_ATTRIB(Method,METHOD,NULL);
669 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
670 PROC_TYPED_CHILD(BaseID,SAMLConstants::SAML20_NS,false);
671 PROC_TYPED_CHILD(NameID,SAMLConstants::SAML20_NS,false);
672 PROC_TYPED_CHILD(EncryptedID,SAMLConstants::SAML20_NS,false);
673 PROC_TYPED_CHILD(KeyInfoConfirmationDataType,SAMLConstants::SAML20_NS,false);
674 PROC_XMLOBJECT_CHILD(SubjectConfirmationData,SAMLConstants::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) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) {
714 setBaseID(src.getBaseID()->cloneBaseID());
716 setNameID(src.getNameID()->cloneNameID());
717 if (src.getEncryptedID())
718 setEncryptedID(src.getEncryptedID()->cloneEncryptedID());
719 VectorOf(SubjectConfirmation) v=getSubjectConfirmations();
720 for (vector<SubjectConfirmation*>::const_iterator i=src.m_SubjectConfirmations.begin(); i!=src.m_SubjectConfirmations.end(); i++) {
722 v.push_back((*i)->cloneSubjectConfirmation());
727 IMPL_XMLOBJECT_CLONE(Subject);
728 IMPL_TYPED_CHILD(NameID);
729 IMPL_TYPED_CHILD(BaseID);
730 IMPL_TYPED_CHILD(EncryptedID);
731 IMPL_TYPED_CHILDREN(SubjectConfirmation,m_children.end());
734 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
735 PROC_TYPED_CHILD(BaseID,SAMLConstants::SAML20_NS,false);
736 PROC_TYPED_CHILD(NameID,SAMLConstants::SAML20_NS,false);
737 PROC_TYPED_CHILD(EncryptedID,SAMLConstants::SAML20_NS,false);
738 PROC_TYPED_CHILDREN(SubjectConfirmation,SAMLConstants::SAML20_NS,false);
739 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
743 class SAML_DLLLOCAL SubjectLocalityImpl : public virtual SubjectLocality,
744 public AbstractChildlessElement,
745 public AbstractDOMCachingXMLObject,
746 public AbstractXMLObjectMarshaller,
747 public AbstractXMLObjectUnmarshaller
750 m_Address=m_DNSName=NULL;
753 virtual ~SubjectLocalityImpl() {
754 XMLString::release(&m_Address);
755 XMLString::release(&m_DNSName);
758 SubjectLocalityImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
759 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
763 SubjectLocalityImpl(const SubjectLocalityImpl& src) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) {
765 setAddress(src.getAddress());
766 setDNSName(src.getDNSName());
769 IMPL_XMLOBJECT_CLONE(SubjectLocality);
770 IMPL_STRING_ATTRIB(Address);
771 IMPL_STRING_ATTRIB(DNSName);
774 void marshallAttributes(DOMElement* domElement) const {
775 MARSHALL_STRING_ATTRIB(Address,ADDRESS,NULL);
776 MARSHALL_STRING_ATTRIB(DNSName,DNSNAME,NULL);
779 void processAttribute(const DOMAttr* attribute) {
780 PROC_STRING_ATTRIB(Address,ADDRESS,NULL);
781 PROC_STRING_ATTRIB(DNSName,DNSNAME,NULL);
782 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
786 //TODO need unit test for this
787 class SAML_DLLLOCAL AuthnContextDeclImpl : public virtual AuthnContextDecl, public AnyElementImpl
790 virtual ~AuthnContextDeclImpl() {}
792 AuthnContextDeclImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
793 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
796 AuthnContextDeclImpl(const AuthnContextDeclImpl& src) : AnyElementImpl(src) {
799 IMPL_XMLOBJECT_CLONE(AuthnContextDecl);
802 class SAML_DLLLOCAL AuthnContextImpl : public virtual AuthnContext,
803 public AbstractComplexElement,
804 public AbstractDOMCachingXMLObject,
805 public AbstractXMLObjectMarshaller,
806 public AbstractXMLObjectUnmarshaller
809 m_AuthnContextClassRef=NULL;
810 m_AuthnContextDecl=NULL;
811 m_AuthnContextDeclRef=NULL;
812 m_children.push_back(NULL);
813 m_children.push_back(NULL);
814 m_children.push_back(NULL);
815 m_pos_AuthnContextClassRef=m_children.begin();
816 m_pos_AuthnContextDecl=m_pos_AuthnContextClassRef;
817 ++m_pos_AuthnContextDecl;
818 m_pos_AuthnContextDeclRef=m_pos_AuthnContextDecl;
819 ++m_pos_AuthnContextDeclRef;
822 virtual ~AuthnContextImpl() {}
824 AuthnContextImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
825 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
829 AuthnContextImpl(const AuthnContextImpl& src) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) {
831 if (src.getAuthnContextClassRef())
832 setAuthnContextClassRef(src.getAuthnContextClassRef()->cloneAuthnContextClassRef());
833 if (src.getAuthnContextDecl())
834 setAuthnContextDecl(src.getAuthnContextDecl()->clone());
835 if (src.getAuthnContextDeclRef())
836 setAuthnContextDeclRef(src.getAuthnContextDeclRef()->cloneAuthnContextDeclRef());
837 VectorOf(AuthenticatingAuthority) v=getAuthenticatingAuthoritys();
838 for (vector<AuthenticatingAuthority*>::const_iterator i=src.m_AuthenticatingAuthoritys.begin(); i!=src.m_AuthenticatingAuthoritys.end(); i++) {
840 v.push_back((*i)->cloneAuthenticatingAuthority());
845 IMPL_XMLOBJECT_CLONE(AuthnContext);
846 IMPL_TYPED_CHILD(AuthnContextClassRef);
847 IMPL_XMLOBJECT_CHILD(AuthnContextDecl);
848 IMPL_TYPED_CHILD(AuthnContextDeclRef);
849 IMPL_TYPED_CHILDREN(AuthenticatingAuthority,m_children.end());
852 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
853 PROC_TYPED_CHILD(AuthnContextClassRef,SAMLConstants::SAML20_NS,false);
854 PROC_XMLOBJECT_CHILD(AuthnContextDecl,SAMLConstants::SAML20_NS);
855 PROC_TYPED_CHILD(AuthnContextDeclRef,SAMLConstants::SAML20_NS,false);
856 PROC_TYPED_CHILDREN(AuthenticatingAuthority,SAMLConstants::SAML20_NS,false);
857 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
861 class SAML_DLLLOCAL AuthnStatementImpl : public virtual AuthnStatement,
862 public AbstractComplexElement,
863 public AbstractDOMCachingXMLObject,
864 public AbstractXMLObjectMarshaller,
865 public AbstractXMLObjectUnmarshaller
870 m_SessionNotOnOrAfter=NULL;
871 m_SubjectLocality=NULL;
873 m_children.push_back(NULL);
874 m_children.push_back(NULL);
875 m_pos_SubjectLocality=m_children.begin();
876 m_pos_AuthnContext=m_pos_SubjectLocality;
877 ++m_pos_AuthnContext;
880 virtual ~AuthnStatementImpl() {
881 delete m_AuthnInstant;
882 XMLString::release(&m_SessionIndex);
883 delete m_SessionNotOnOrAfter;
886 AuthnStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
887 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
891 AuthnStatementImpl(const AuthnStatementImpl& src) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) {
893 setAuthnInstant(src.getAuthnInstant());
894 setSessionIndex(src.getSessionIndex());
895 setSessionNotOnOrAfter(src.getSessionNotOnOrAfter());
896 if (src.getSubjectLocality())
897 setSubjectLocality(src.getSubjectLocality()->cloneSubjectLocality());
898 if (src.getAuthnContext())
899 setAuthnContext(src.getAuthnContext()->cloneAuthnContext());
902 IMPL_XMLOBJECT_CLONE(AuthnStatement);
903 Statement* cloneStatement() const {
904 return cloneAuthnStatement();
906 IMPL_DATETIME_ATTRIB(AuthnInstant,0);
907 IMPL_STRING_ATTRIB(SessionIndex);
908 IMPL_DATETIME_ATTRIB(SessionNotOnOrAfter,SAMLTIME_MAX);
909 IMPL_TYPED_CHILD(SubjectLocality);
910 IMPL_TYPED_CHILD(AuthnContext);
913 void marshallAttributes(DOMElement* domElement) const {
914 MARSHALL_DATETIME_ATTRIB(AuthnInstant,AUTHNINSTANT,NULL);
915 MARSHALL_STRING_ATTRIB(SessionIndex,SESSIONINDEX,NULL);
916 MARSHALL_DATETIME_ATTRIB(SessionNotOnOrAfter,SESSIONNOTONORAFTER,NULL);
919 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
920 PROC_TYPED_CHILD(SubjectLocality,SAMLConstants::SAML20_NS,false);
921 PROC_TYPED_CHILD(AuthnContext,SAMLConstants::SAML20_NS,false);
922 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
925 void processAttribute(const DOMAttr* attribute) {
926 PROC_DATETIME_ATTRIB(AuthnInstant,AUTHNINSTANT,NULL);
927 PROC_STRING_ATTRIB(SessionIndex,SESSIONINDEX,NULL);
928 PROC_DATETIME_ATTRIB(SessionNotOnOrAfter,SESSIONNOTONORAFTER,NULL);
929 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
933 class SAML_DLLLOCAL ActionImpl : public virtual Action,
934 public AbstractSimpleElement,
935 public AbstractChildlessElement,
936 public AbstractDOMCachingXMLObject,
937 public AbstractXMLObjectMarshaller,
938 public AbstractXMLObjectUnmarshaller
941 virtual ~ActionImpl() {
942 XMLString::release(&m_Namespace);
945 ActionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
946 : AbstractXMLObject(nsURI, localName, prefix, schemaType), m_Namespace(NULL) {
949 ActionImpl(const ActionImpl& src)
950 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
951 setNamespace(src.getNamespace());
954 IMPL_XMLOBJECT_CLONE(Action);
955 IMPL_STRING_ATTRIB(Namespace);
956 IMPL_XMLOBJECT_CONTENT;
959 void marshallAttributes(DOMElement* domElement) const {
960 MARSHALL_STRING_ATTRIB(Namespace,NAMESPACE,NULL);
963 void processAttribute(const DOMAttr* attribute) {
964 PROC_STRING_ATTRIB(Namespace,NAMESPACE,NULL);
965 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
969 class SAML_DLLLOCAL EvidenceImpl : public virtual Evidence,
970 public AbstractComplexElement,
971 public AbstractDOMCachingXMLObject,
972 public AbstractXMLObjectMarshaller,
973 public AbstractXMLObjectUnmarshaller
976 virtual ~EvidenceImpl() {}
978 EvidenceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
979 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
982 EvidenceImpl(const EvidenceImpl& src) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) {
983 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
985 AssertionIDRef* ref=dynamic_cast<AssertionIDRef*>(*i);
987 getAssertionIDRefs().push_back(ref->cloneAssertionIDRef());
991 AssertionURIRef* uri=dynamic_cast<AssertionURIRef*>(*i);
993 getAssertionURIRefs().push_back(uri->cloneAssertionURIRef());
997 Assertion* assertion=dynamic_cast<Assertion*>(*i);
999 getAssertions().push_back(assertion->cloneAssertion());
1003 EncryptedAssertion* enc=dynamic_cast<EncryptedAssertion*>(*i);
1005 getEncryptedAssertions().push_back(enc->cloneEncryptedAssertion());
1012 IMPL_XMLOBJECT_CLONE(Evidence);
1013 IMPL_TYPED_CHILDREN(AssertionIDRef,m_children.end());
1014 IMPL_TYPED_CHILDREN(AssertionURIRef,m_children.end());
1015 IMPL_TYPED_CHILDREN(Assertion,m_children.end());
1016 IMPL_TYPED_CHILDREN(EncryptedAssertion,m_children.end());
1019 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1020 PROC_TYPED_CHILDREN(AssertionIDRef,SAMLConstants::SAML20_NS,false);
1021 PROC_TYPED_CHILDREN(AssertionURIRef,SAMLConstants::SAML20_NS,false);
1022 PROC_TYPED_CHILDREN(Assertion,SAMLConstants::SAML20_NS,false);
1023 PROC_TYPED_CHILDREN(EncryptedAssertion,SAMLConstants::SAML20_NS,false);
1024 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1028 class SAML_DLLLOCAL AuthzDecisionStatementImpl : public virtual AuthzDecisionStatement,
1029 public AbstractComplexElement,
1030 public AbstractDOMCachingXMLObject,
1031 public AbstractXMLObjectMarshaller,
1032 public AbstractXMLObjectUnmarshaller
1038 m_children.push_back(NULL);
1039 m_pos_Evidence=m_children.begin();
1042 virtual ~AuthzDecisionStatementImpl() {
1043 XMLString::release(&m_Resource);
1044 XMLString::release(&m_Decision);
1047 AuthzDecisionStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1048 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1052 AuthzDecisionStatementImpl(const AuthzDecisionStatementImpl& src)
1053 : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) {
1055 setResource(src.getResource());
1056 setDecision(src.getDecision());
1057 if (src.getEvidence())
1058 setEvidence(src.getEvidence()->cloneEvidence());
1059 VectorOf(Action) v=getActions();
1060 for (vector<Action*>::const_iterator i=src.m_Actions.begin(); i!=src.m_Actions.end(); i++) {
1062 v.push_back((*i)->cloneAction());
1067 IMPL_XMLOBJECT_CLONE(AuthzDecisionStatement);
1068 Statement* cloneStatement() const {
1069 return cloneAuthzDecisionStatement();
1071 IMPL_STRING_ATTRIB(Resource);
1072 IMPL_STRING_ATTRIB(Decision);
1073 IMPL_TYPED_CHILD(Evidence);
1074 IMPL_TYPED_CHILDREN(Action, m_pos_Evidence);
1077 void marshallAttributes(DOMElement* domElement) const {
1078 MARSHALL_STRING_ATTRIB(Resource,RESOURCE,NULL);
1079 MARSHALL_STRING_ATTRIB(Decision,DECISION,NULL);
1082 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1083 PROC_TYPED_CHILD(Evidence,SAMLConstants::SAML20_NS,false);
1084 PROC_TYPED_CHILDREN(Action,SAMLConstants::SAML20_NS,false);
1085 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1088 void processAttribute(const DOMAttr* attribute) {
1089 PROC_STRING_ATTRIB(Resource,RESOURCE,NULL);
1090 PROC_STRING_ATTRIB(Decision,DECISION,NULL);
1091 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
1095 //TODO need unit test for this
1096 class SAML_DLLLOCAL AttributeValueImpl : public virtual AttributeValue, public AnyElementImpl
1099 virtual ~AttributeValueImpl() {}
1101 AttributeValueImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1102 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1105 AttributeValueImpl(const AttributeValueImpl& src) : AnyElementImpl(src) {
1108 IMPL_XMLOBJECT_CLONE(AttributeValue);
1112 class SAML_DLLLOCAL AttributeImpl : public virtual Attribute,
1113 public AbstractComplexElement,
1114 public AbstractAttributeExtensibleXMLObject,
1115 public AbstractDOMCachingXMLObject,
1116 public AbstractXMLObjectMarshaller,
1117 public AbstractXMLObjectUnmarshaller
1120 m_Name=m_NameFormat=m_FriendlyName=NULL;
1123 virtual ~AttributeImpl() {
1124 XMLString::release(&m_Name);
1125 XMLString::release(&m_NameFormat);
1126 XMLString::release(&m_FriendlyName);
1129 AttributeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1130 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1134 AttributeImpl(const AttributeImpl& src)
1135 : AbstractXMLObject(src), AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
1137 setName(src.getName());
1138 setNameFormat(src.getNameFormat());
1139 setFriendlyName(src.getFriendlyName());
1140 VectorOf(XMLObject) v=getAttributeValues();
1141 for (vector<XMLObject*>::const_iterator i=src.m_AttributeValues.begin(); i!=src.m_AttributeValues.end(); i++) {
1143 v.push_back((*i)->clone());
1148 IMPL_XMLOBJECT_CLONE(Attribute);
1149 IMPL_STRING_ATTRIB(Name);
1150 IMPL_STRING_ATTRIB(NameFormat);
1151 IMPL_STRING_ATTRIB(FriendlyName);
1152 IMPL_XMLOBJECT_CHILDREN(AttributeValue,m_children.end());
1154 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
1155 if (!qualifiedName.hasNamespaceURI()) {
1156 if (XMLString::equals(qualifiedName.getLocalPart(),NAME_ATTRIB_NAME)) {
1160 else if (XMLString::equals(qualifiedName.getLocalPart(),NAMEFORMAT_ATTRIB_NAME)) {
1161 setNameFormat(value);
1164 else if (XMLString::equals(qualifiedName.getLocalPart(),FRIENDLYNAME_ATTRIB_NAME)) {
1165 setFriendlyName(value);
1169 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
1173 void marshallAttributes(DOMElement* domElement) const {
1174 MARSHALL_STRING_ATTRIB(Name,NAME,NULL);
1175 MARSHALL_STRING_ATTRIB(NameFormat,NAMEFORMAT,NULL);
1176 MARSHALL_STRING_ATTRIB(FriendlyName,FRIENDLYNAME,NULL);
1177 marshallExtensionAttributes(domElement);
1180 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1181 getAttributeValues().push_back(childXMLObject);
1184 void processAttribute(const DOMAttr* attribute) {
1185 unmarshallExtensionAttribute(attribute);
1189 //TODO unit test for this
1190 class SAML_DLLLOCAL EncryptedAttributeImpl : public virtual EncryptedAttribute, public EncryptedElementTypeImpl
1193 virtual ~EncryptedAttributeImpl() {}
1195 EncryptedAttributeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1196 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1198 EncryptedAttributeImpl(const EncryptedAttributeImpl& src) : AbstractXMLObject(src), EncryptedElementTypeImpl(src) {}
1200 IMPL_XMLOBJECT_CLONE(EncryptedAttribute);
1201 EncryptedElementType* cloneEncryptedElementType() const {
1202 return new EncryptedAttributeImpl(*this);
1206 class SAML_DLLLOCAL AttributeStatementImpl : public virtual AttributeStatement,
1207 public AbstractComplexElement,
1208 public AbstractDOMCachingXMLObject,
1209 public AbstractXMLObjectMarshaller,
1210 public AbstractXMLObjectUnmarshaller
1213 virtual ~AttributeStatementImpl() {}
1215 AttributeStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1216 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1219 AttributeStatementImpl(const AttributeStatementImpl& src) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) {
1220 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
1222 Attribute* attribute=dynamic_cast<Attribute*>(*i);
1224 getAttributes().push_back(attribute->cloneAttribute());
1228 EncryptedAttribute* enc=dynamic_cast<EncryptedAttribute*>(*i);
1230 getEncryptedAttributes().push_back(enc->cloneEncryptedAttribute());
1237 IMPL_XMLOBJECT_CLONE(AttributeStatement);
1238 Statement* cloneStatement() const {
1239 return cloneAttributeStatement();
1241 IMPL_TYPED_CHILDREN(Attribute, m_children.end());
1242 IMPL_TYPED_CHILDREN(EncryptedAttribute, m_children.end());
1245 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1246 PROC_TYPED_CHILDREN(Attribute,SAMLConstants::SAML20_NS,false);
1247 PROC_TYPED_CHILDREN(EncryptedAttribute,SAMLConstants::SAML20_NS,false);
1248 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1252 class SAML_DLLLOCAL AdviceImpl : public virtual Advice,
1253 public AbstractComplexElement,
1254 public AbstractDOMCachingXMLObject,
1255 public AbstractXMLObjectMarshaller,
1256 public AbstractXMLObjectUnmarshaller
1259 virtual ~AdviceImpl() {}
1261 AdviceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1262 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1265 AdviceImpl(const AdviceImpl& src) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) {
1266 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
1268 AssertionIDRef* ref=dynamic_cast<AssertionIDRef*>(*i);
1270 getAssertionIDRefs().push_back(ref->cloneAssertionIDRef());
1274 AssertionURIRef* uri=dynamic_cast<AssertionURIRef*>(*i);
1276 getAssertionURIRefs().push_back(uri->cloneAssertionURIRef());
1280 Assertion* assertion=dynamic_cast<Assertion*>(*i);
1282 getAssertions().push_back(assertion->cloneAssertion());
1286 EncryptedAssertion* enc=dynamic_cast<EncryptedAssertion*>(*i);
1288 getEncryptedAssertions().push_back(enc->cloneEncryptedAssertion());
1292 getOthers().push_back((*i)->clone());
1297 IMPL_XMLOBJECT_CLONE(Advice);
1298 IMPL_TYPED_CHILDREN(AssertionIDRef,m_children.end());
1299 IMPL_TYPED_CHILDREN(AssertionURIRef,m_children.end());
1300 IMPL_TYPED_CHILDREN(Assertion,m_children.end());
1301 IMPL_TYPED_CHILDREN(EncryptedAssertion,m_children.end());
1302 IMPL_XMLOBJECT_CHILDREN(Other,m_children.end());
1305 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1306 PROC_TYPED_CHILDREN(AssertionIDRef,SAMLConstants::SAML20_NS,false);
1307 PROC_TYPED_CHILDREN(AssertionURIRef,SAMLConstants::SAML20_NS,false);
1308 PROC_TYPED_CHILDREN(Assertion,SAMLConstants::SAML20_NS,false);
1309 PROC_TYPED_CHILDREN(EncryptedAssertion,SAMLConstants::SAML20_NS,false);
1312 const XMLCh* nsURI=root->getNamespaceURI();
1313 if (!XMLString::equals(nsURI,SAMLConstants::SAML20_NS) && nsURI && *nsURI) {
1314 getOthers().push_back(childXMLObject);
1318 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1322 //TODO unit test for this
1323 class SAML_DLLLOCAL EncryptedAssertionImpl : public virtual EncryptedAssertion, public EncryptedElementTypeImpl
1326 virtual ~EncryptedAssertionImpl() {}
1328 EncryptedAssertionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1329 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1331 EncryptedAssertionImpl(const EncryptedAssertionImpl& src) : AbstractXMLObject(src), EncryptedElementTypeImpl(src) {}
1333 IMPL_XMLOBJECT_CLONE(EncryptedAssertion);
1334 EncryptedElementType* cloneEncryptedElementType() const {
1335 return new EncryptedAssertionImpl(*this);
1339 class SAML_DLLLOCAL AssertionImpl : public virtual Assertion,
1340 public AbstractComplexElement,
1341 public AbstractDOMCachingXMLObject,
1342 public AbstractXMLObjectMarshaller,
1343 public AbstractXMLObjectUnmarshaller
1348 m_IssueInstant=NULL;
1354 m_children.push_back(NULL);
1355 m_children.push_back(NULL);
1356 m_children.push_back(NULL);
1357 m_children.push_back(NULL);
1358 m_children.push_back(NULL);
1359 m_pos_Issuer=m_children.begin();
1360 m_pos_Signature=m_pos_Issuer;
1362 m_pos_Subject=m_pos_Signature;
1364 m_pos_Conditions=m_pos_Subject;
1366 m_pos_Advice=m_pos_Conditions;
1370 virtual ~AssertionImpl() {
1371 XMLString::release(&m_ID);
1372 XMLString::release(&m_Version);
1373 delete m_IssueInstant;
1376 AssertionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1377 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1381 AssertionImpl(const AssertionImpl& src) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) {
1383 setVersion(src.getVersion());
1385 setIssueInstant(src.getIssueInstant());
1386 if (src.getIssuer())
1387 setIssuer(src.getIssuer()->cloneIssuer());
1388 if (src.getSignature())
1389 setSignature(src.getSignature()->cloneSignature());
1390 if (src.getSubject())
1391 setSubject(src.getSubject()->cloneSubject());
1392 if (src.getConditions())
1393 setConditions(src.getConditions()->cloneConditions());
1394 if (src.getAdvice())
1395 setAdvice(src.getAdvice()->cloneAdvice());
1396 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
1398 AuthnStatement* authst=dynamic_cast<AuthnStatement*>(*i);
1400 getAuthnStatements().push_back(authst->cloneAuthnStatement());
1404 AttributeStatement* attst=dynamic_cast<AttributeStatement*>(*i);
1406 getAttributeStatements().push_back(attst->cloneAttributeStatement());
1410 AuthzDecisionStatement* authzst=dynamic_cast<AuthzDecisionStatement*>(*i);
1412 getAuthzDecisionStatements().push_back(authzst->cloneAuthzDecisionStatement());
1416 Statement* st=dynamic_cast<Statement*>(*i);
1418 getStatements().push_back(st->cloneStatement());
1425 //IMPL_TYPED_CHILD(Signature);
1426 // Need customized setter.
1428 Signature* m_Signature;
1429 list<XMLObject*>::iterator m_pos_Signature;
1431 Signature* getSignature() const {
1435 void setSignature(Signature* sig) {
1436 prepareForAssignment(m_Signature,sig);
1437 *m_pos_Signature=m_Signature=sig;
1438 // Sync content reference back up.
1440 m_Signature->setContentReference(new opensaml::ContentReference(*this));
1443 IMPL_XMLOBJECT_CLONE(Assertion);
1444 IMPL_STRING_ATTRIB(Version);
1446 IMPL_DATETIME_ATTRIB(IssueInstant,0);
1447 IMPL_TYPED_CHILD(Issuer);
1448 IMPL_TYPED_CHILD(Subject);
1449 IMPL_TYPED_CHILD(Conditions);
1450 IMPL_TYPED_CHILD(Advice);
1451 IMPL_TYPED_CHILDREN(Statement, m_children.end());
1452 IMPL_TYPED_CHILDREN(AuthnStatement, m_children.end());
1453 IMPL_TYPED_CHILDREN(AttributeStatement, m_children.end());
1454 IMPL_TYPED_CHILDREN(AuthzDecisionStatement, m_children.end());
1457 void marshallAttributes(DOMElement* domElement) const {
1459 const_cast<AssertionImpl*>(this)->m_Version=XMLString::transcode("2.0");
1460 MARSHALL_STRING_ATTRIB(Version,VER,NULL);
1462 const_cast<AssertionImpl*>(this)->m_ID=SAMLConfig::getConfig().generateIdentifier();
1463 MARSHALL_ID_ATTRIB(ID,ID,NULL);
1464 if (!m_IssueInstant) {
1465 const_cast<AssertionImpl*>(this)->m_IssueInstantEpoch=time(NULL);
1466 const_cast<AssertionImpl*>(this)->m_IssueInstant=new DateTime(m_IssueInstantEpoch);
1468 MARSHALL_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,NULL);
1471 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1472 PROC_TYPED_CHILD(Issuer,SAMLConstants::SAML20_NS,false);
1473 PROC_TYPED_CHILD(Signature,XMLConstants::XMLSIG_NS,false);
1474 PROC_TYPED_CHILD(Subject,SAMLConstants::SAML20_NS,false);
1475 PROC_TYPED_CHILD(Conditions,SAMLConstants::SAML20_NS,false);
1476 PROC_TYPED_CHILD(Advice,SAMLConstants::SAML20_NS,false);
1477 PROC_TYPED_CHILDREN(AuthnStatement,SAMLConstants::SAML20_NS,false);
1478 PROC_TYPED_CHILDREN(AttributeStatement,SAMLConstants::SAML20_NS,false);
1479 PROC_TYPED_CHILDREN(AuthzDecisionStatement,SAMLConstants::SAML20_NS,false);
1480 PROC_TYPED_CHILDREN(Statement,SAMLConstants::SAML20_NS,false);
1481 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1484 void processAttribute(const DOMAttr* attribute) {
1485 PROC_STRING_ATTRIB(Version,VER,NULL);
1486 PROC_ID_ATTRIB(ID,ID,NULL);
1487 PROC_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,NULL);
1488 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
1495 #if defined (_MSC_VER)
1496 #pragma warning( pop )
1499 // Builder Implementations
1501 IMPL_XMLOBJECTBUILDER(Action);
1502 IMPL_XMLOBJECTBUILDER(Advice);
1503 IMPL_XMLOBJECTBUILDER(Assertion);
1504 IMPL_XMLOBJECTBUILDER(AssertionIDRef);
1505 IMPL_XMLOBJECTBUILDER(AssertionURIRef);
1506 IMPL_XMLOBJECTBUILDER(Attribute);
1507 IMPL_XMLOBJECTBUILDER(AttributeStatement);
1508 IMPL_XMLOBJECTBUILDER(AttributeValue);
1509 IMPL_XMLOBJECTBUILDER(Audience);
1510 IMPL_XMLOBJECTBUILDER(AudienceRestriction);
1511 IMPL_XMLOBJECTBUILDER(AuthenticatingAuthority);
1512 IMPL_XMLOBJECTBUILDER(AuthnContext);
1513 IMPL_XMLOBJECTBUILDER(AuthnContextClassRef);
1514 IMPL_XMLOBJECTBUILDER(AuthnContextDecl);
1515 IMPL_XMLOBJECTBUILDER(AuthnContextDeclRef);
1516 IMPL_XMLOBJECTBUILDER(AuthnStatement);
1517 IMPL_XMLOBJECTBUILDER(AuthzDecisionStatement);
1518 IMPL_XMLOBJECTBUILDER(Conditions);
1519 IMPL_XMLOBJECTBUILDER(EncryptedAssertion);
1520 IMPL_XMLOBJECTBUILDER(EncryptedAttribute);
1521 IMPL_XMLOBJECTBUILDER(EncryptedID);
1522 IMPL_XMLOBJECTBUILDER(Evidence);
1523 IMPL_XMLOBJECTBUILDER(Issuer);
1524 IMPL_XMLOBJECTBUILDER(KeyInfoConfirmationDataType);
1525 IMPL_XMLOBJECTBUILDER(NameID);
1526 IMPL_XMLOBJECTBUILDER(NameIDType);
1527 IMPL_XMLOBJECTBUILDER(OneTimeUse);
1528 IMPL_XMLOBJECTBUILDER(ProxyRestriction);
1529 IMPL_XMLOBJECTBUILDER(Subject);
1530 IMPL_XMLOBJECTBUILDER(SubjectConfirmation);
1531 IMPL_XMLOBJECTBUILDER(SubjectConfirmationData);
1532 IMPL_XMLOBJECTBUILDER(SubjectLocality);
1535 const XMLCh Action::LOCAL_NAME[] = UNICODE_LITERAL_6(A,c,t,i,o,n);
1536 const XMLCh Action::TYPE_NAME[] = UNICODE_LITERAL_10(A,c,t,i,o,n,T,y,p,e);
1537 const XMLCh Action::NAMESPACE_ATTRIB_NAME[] = UNICODE_LITERAL_9(N,a,m,e,s,p,a,c,e);
1538 const XMLCh Advice::LOCAL_NAME[] = UNICODE_LITERAL_6(A,d,v,i,c,e);
1539 const XMLCh Advice::TYPE_NAME[] = UNICODE_LITERAL_10(A,d,v,i,c,e,T,y,p,e);
1540 const XMLCh Assertion::LOCAL_NAME[] = UNICODE_LITERAL_9(A,s,s,e,r,t,i,o,n);
1541 const XMLCh Assertion::TYPE_NAME[] = UNICODE_LITERAL_13(A,s,s,e,r,t,i,o,n,T,y,p,e);
1542 const XMLCh Assertion::VER_ATTRIB_NAME[] = UNICODE_LITERAL_7(V,e,r,s,i,o,n);
1543 const XMLCh Assertion::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
1544 const XMLCh Assertion::ISSUEINSTANT_ATTRIB_NAME[] = UNICODE_LITERAL_12(I,s,s,u,e,I,n,s,t,a,n,t);
1545 const XMLCh AssertionIDRef::LOCAL_NAME[] = UNICODE_LITERAL_14(A,s,s,e,r,t,i,o,n,I,D,R,e,f);
1546 const XMLCh AssertionURIRef::LOCAL_NAME[] = UNICODE_LITERAL_15(A,s,s,e,r,t,i,o,n,U,R,I,R,e,f);
1547 const XMLCh Attribute::LOCAL_NAME[] = UNICODE_LITERAL_9(A,t,t,r,i,b,u,t,e);
1548 const XMLCh Attribute::TYPE_NAME[] = UNICODE_LITERAL_13(A,t,t,r,i,b,u,t,e,T,y,p,e);
1549 const XMLCh Attribute::NAME_ATTRIB_NAME[] = UNICODE_LITERAL_4(N,a,m,e);
1550 const XMLCh Attribute::NAMEFORMAT_ATTRIB_NAME[] = UNICODE_LITERAL_10(N,a,m,e,F,o,r,m,a,t);
1551 const XMLCh Attribute::FRIENDLYNAME_ATTRIB_NAME[] = UNICODE_LITERAL_12(F,r,i,e,n,d,l,y,N,a,m,e);
1552 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);
1553 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);
1554 const XMLCh AttributeValue::LOCAL_NAME[] = UNICODE_LITERAL_14(A,t,t,r,i,b,u,t,e,V,a,l,u,e);
1555 const XMLCh Audience::LOCAL_NAME[] = UNICODE_LITERAL_8(A,u,d,i,e,n,c,e);
1556 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);
1557 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);
1558 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);
1559 const XMLCh AuthnContext::LOCAL_NAME[] = UNICODE_LITERAL_12(A,u,t,h,n,C,o,n,t,e,x,t);
1560 const XMLCh AuthnContext::TYPE_NAME[] = UNICODE_LITERAL_16(A,u,t,h,n,C,o,n,t,e,x,t,T,y,p,e);
1561 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);
1562 const XMLCh AuthnContextDecl::LOCAL_NAME[] = UNICODE_LITERAL_16(A,u,t,h,n,C,o,n,t,e,x,t,D,e,c,l);
1563 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);
1564 const XMLCh AuthnStatement::LOCAL_NAME[] = UNICODE_LITERAL_14(A,u,t,h,n,S,t,a,t,e,m,e,n,t);
1565 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);
1566 const XMLCh AuthnStatement::AUTHNINSTANT_ATTRIB_NAME[] = UNICODE_LITERAL_12(A,u,t,h,n,I,n,s,t,a,n,t);
1567 const XMLCh AuthnStatement::SESSIONINDEX_ATTRIB_NAME[] = UNICODE_LITERAL_12(S,e,s,s,i,o,n,I,n,d,e,x);
1568 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);
1569 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);
1570 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);
1571 const XMLCh AuthzDecisionStatement::RESOURCE_ATTRIB_NAME[] = UNICODE_LITERAL_8(R,e,s,o,u,r,c,e);
1572 const XMLCh AuthzDecisionStatement::DECISION_ATTRIB_NAME[] = UNICODE_LITERAL_8(D,e,c,i,s,i,o,n);
1573 const XMLCh AuthzDecisionStatement::DECISION_PERMIT[] = UNICODE_LITERAL_6(P,e,r,m,i,t);
1574 const XMLCh AuthzDecisionStatement::DECISION_DENY[] = UNICODE_LITERAL_4(D,e,n,y);
1575 const XMLCh AuthzDecisionStatement::DECISION_INDETERMINATE[] = UNICODE_LITERAL_13(I,n,d,e,t,e,r,m,i,n,a,t,e);
1576 const XMLCh BaseID::LOCAL_NAME[] = UNICODE_LITERAL_6(B,a,s,e,I,D);
1577 const XMLCh BaseID::NAMEQUALIFIER_ATTRIB_NAME[] = UNICODE_LITERAL_13(N,a,m,e,Q,u,a,l,i,f,i,e,r);
1578 const XMLCh BaseID::SPNAMEQUALIFIER_ATTRIB_NAME[] = UNICODE_LITERAL_15(S,P,N,a,m,e,Q,u,a,l,i,f,i,e,r);
1579 const XMLCh Condition::LOCAL_NAME[] = UNICODE_LITERAL_9(C,o,n,d,i,t,i,o,n);
1580 const XMLCh Conditions::LOCAL_NAME[] = UNICODE_LITERAL_10(C,o,n,d,i,t,i,o,n,s);
1581 const XMLCh Conditions::TYPE_NAME[] = UNICODE_LITERAL_14(C,o,n,d,i,t,i,o,n,s,T,y,p,e);
1582 const XMLCh Conditions::NOTBEFORE_ATTRIB_NAME[] = UNICODE_LITERAL_9(N,o,t,B,e,f,o,r,e);
1583 const XMLCh Conditions::NOTONORAFTER_ATTRIB_NAME[] =UNICODE_LITERAL_12(N,o,t,O,n,O,r,A,f,t,e,r);
1584 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);
1585 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);
1586 const XMLCh EncryptedElementType::LOCAL_NAME[] = {chNull};
1587 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);
1588 const XMLCh EncryptedID::LOCAL_NAME[] = UNICODE_LITERAL_11(E,n,c,r,y,p,t,e,d,I,d);
1589 const XMLCh Evidence::LOCAL_NAME[] = UNICODE_LITERAL_8(E,v,i,d,e,n,c,e);
1590 const XMLCh Evidence::TYPE_NAME[] = UNICODE_LITERAL_12(E,v,i,d,e,n,c,e,T,y,p,e);
1591 const XMLCh Issuer::LOCAL_NAME[] = UNICODE_LITERAL_6(I,s,s,u,e,r);
1592 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);
1593 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);
1594 const XMLCh KeyInfoConfirmationDataType::NOTBEFORE_ATTRIB_NAME[] = UNICODE_LITERAL_9(N,o,t,B,e,f,o,r,e);
1595 const XMLCh KeyInfoConfirmationDataType::NOTONORAFTER_ATTRIB_NAME[] = UNICODE_LITERAL_12(N,o,t,O,n,O,r,A,f,t,e,r);
1596 const XMLCh KeyInfoConfirmationDataType::INRESPONSETO_ATTRIB_NAME[] = UNICODE_LITERAL_12(I,n,R,e,s,p,o,n,s,e,T,o);
1597 const XMLCh KeyInfoConfirmationDataType::RECIPIENT_ATTRIB_NAME[] = UNICODE_LITERAL_9(R,e,c,i,p,i,e,n,t);
1598 const XMLCh KeyInfoConfirmationDataType::ADDRESS_ATTRIB_NAME[] = UNICODE_LITERAL_7(A,d,d,r,e,s,s);
1599 const XMLCh NameID::LOCAL_NAME[] = UNICODE_LITERAL_6(N,a,m,e,I,D);
1600 const XMLCh NameIDType::LOCAL_NAME[] = {chNull};
1601 const XMLCh NameIDType::TYPE_NAME[] = UNICODE_LITERAL_10(N,a,m,e,I,D,T,y,p,e);
1602 const XMLCh NameIDType::NAMEQUALIFIER_ATTRIB_NAME[] = UNICODE_LITERAL_13(N,a,m,e,Q,u,a,l,i,f,i,e,r);
1603 const XMLCh NameIDType::SPNAMEQUALIFIER_ATTRIB_NAME[] = UNICODE_LITERAL_15(S,P,N,a,m,e,Q,u,a,l,i,f,i,e,r);
1604 const XMLCh NameIDType::FORMAT_ATTRIB_NAME[] = UNICODE_LITERAL_6(F,o,r,m,a,t);
1605 const XMLCh NameIDType::SPPROVIDEDID_ATTRIB_NAME[] = UNICODE_LITERAL_12(S,P,P,r,o,v,i,d,e,d,I,D);
1606 const XMLCh OneTimeUse::LOCAL_NAME[] = UNICODE_LITERAL_10(O,n,e,T,i,m,e,U,s,e);
1607 const XMLCh OneTimeUse::TYPE_NAME[] = UNICODE_LITERAL_14(O,n,e,T,i,m,e,U,s,e,T,y,p,e);
1608 const XMLCh ProxyRestriction::LOCAL_NAME[] = UNICODE_LITERAL_16(P,r,o,x,y,R,e,s,t,r,i,c,t,i,o,n);
1609 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);
1610 const XMLCh ProxyRestriction::COUNT_ATTRIB_NAME[] = UNICODE_LITERAL_5(C,o,u,n,t);
1611 const XMLCh Statement::LOCAL_NAME[] = UNICODE_LITERAL_9(S,t,a,t,e,m,e,n,t);
1612 const XMLCh Subject::LOCAL_NAME[] = UNICODE_LITERAL_7(S,u,b,j,e,c,t);
1613 const XMLCh Subject::TYPE_NAME[] = UNICODE_LITERAL_11(S,u,b,j,e,c,t,T,y,p,e);
1614 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);
1615 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);
1616 const XMLCh SubjectConfirmation::METHOD_ATTRIB_NAME[] = UNICODE_LITERAL_6(M,e,t,h,o,d);
1617 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);
1618 const XMLCh SubjectConfirmationData::NOTBEFORE_ATTRIB_NAME[] = UNICODE_LITERAL_9(N,o,t,B,e,f,o,r,e);
1619 const XMLCh SubjectConfirmationData::NOTONORAFTER_ATTRIB_NAME[] = UNICODE_LITERAL_12(N,o,t,O,n,O,r,A,f,t,e,r);
1620 const XMLCh SubjectConfirmationData::INRESPONSETO_ATTRIB_NAME[] = UNICODE_LITERAL_12(I,n,R,e,s,p,o,n,s,e,T,o);
1621 const XMLCh SubjectConfirmationData::RECIPIENT_ATTRIB_NAME[] = UNICODE_LITERAL_9(R,e,c,i,p,i,e,n,t);
1622 const XMLCh SubjectConfirmationData::ADDRESS_ATTRIB_NAME[] = UNICODE_LITERAL_7(A,d,d,r,e,s,s);
1623 const XMLCh SubjectLocality::LOCAL_NAME[] = UNICODE_LITERAL_15(S,u,b,j,e,c,t,L,o,c,a,l,i,t,y);
1624 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);
1625 const XMLCh SubjectLocality::ADDRESS_ATTRIB_NAME[] =UNICODE_LITERAL_7(A,d,d,r,e,s,s);
1626 const XMLCh SubjectLocality::DNSNAME_ATTRIB_NAME[] =UNICODE_LITERAL_7(D,N,S,N,a,m,e);
1628 const XMLCh NameIDType::UNSPECIFIED[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified
1629 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1630 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1631 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1632 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1633 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1634 chLatin_u, chLatin_n, chLatin_s, chLatin_p, chLatin_e, chLatin_c, chLatin_i, chLatin_f, chLatin_i, chLatin_e, chLatin_d, chLatin_d, chNull
1637 const XMLCh NameIDType::EMAIL[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress
1638 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1639 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1640 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1641 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1642 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1643 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
1646 const XMLCh NameIDType::X509_SUBJECT[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName
1647 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1648 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1649 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1650 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1651 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1652 chLatin_X, chDigit_5, chDigit_0, chDigit_9, chLatin_S, chLatin_u, chLatin_b, chLatin_j, chLatin_e, chLatin_c, chLatin_t,
1653 chLatin_N, chLatin_a, chLatin_m, chLatin_e, chNull
1656 const XMLCh NameIDType::WIN_DOMAIN_QUALIFIED[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName
1657 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1658 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1659 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1660 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1661 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1662 chLatin_W, chLatin_i, chLatin_n, chLatin_d, chLatin_o, chLatin_w, chLatin_s,
1663 chLatin_D, chLatin_o, chLatin_m, chLatin_a, chLatin_i, chLatin_n,
1664 chLatin_Q, chLatin_u, chLatin_a, chLatin_l, chLatin_i, chLatin_f, chLatin_i, chLatin_e, chLatin_d,
1665 chLatin_N, chLatin_a, chLatin_m, chLatin_e, chNull
1668 const XMLCh NameIDType::KERBEROS[] = // urn:oasis:names:tc:SAML:2.0:nameid-format:kerberos
1669 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1670 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1671 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1672 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1673 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1674 chLatin_k, chLatin_e, chLatin_r, chLatin_b, chLatin_e, chLatin_r, chLatin_o, chLatin_s, chNull
1677 const XMLCh NameIDType::ENTITY[] = // urn:oasis:names:tc:SAML:2.0:nameid-format:entity
1678 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1679 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1680 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1681 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1682 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1683 chLatin_e, chLatin_n, chLatin_t, chLatin_i, chLatin_t, chLatin_y, chNull
1686 const XMLCh NameIDType::PERSISTENT[] = // urn:oasis:names:tc:SAML:2.0:nameid-format:persistent
1687 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1688 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1689 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1690 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1691 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1692 chLatin_p, chLatin_e, chLatin_r, chLatin_s, chLatin_i, chLatin_s, chLatin_t, chLatin_e, chLatin_n, chLatin_t, chNull
1695 const XMLCh NameIDType::TRANSIENT[] = // urn:oasis:names:tc:SAML:2.0:nameid-format:transient
1696 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1697 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1698 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1699 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1700 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1701 chLatin_t, chLatin_r, chLatin_a, chLatin_n, chLatin_s, chLatin_i, chLatin_e, chLatin_n, chLatin_t, chNull
1704 const XMLCh SubjectConfirmation::BEARER[] = // urn:oasis:names:tc:SAML:2.0:cm:bearer
1705 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1706 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1707 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1708 chLatin_c, chLatin_m, chColon, chLatin_b, chLatin_e, chLatin_a, chLatin_r, chLatin_e, chLatin_r, chNull
1711 const XMLCh SubjectConfirmation::HOLDER_KEY[] = // urn:oasis:names:tc:SAML:2.0:cm:holder-of-key
1712 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1713 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1714 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1715 chLatin_c, chLatin_m, chColon, chLatin_h, chLatin_o, chLatin_l, chLatin_d, chLatin_e, chLatin_r, chDash,
1716 chLatin_o, chLatin_f, chDash, chLatin_k, chLatin_e, chLatin_y, chNull
1719 const XMLCh SubjectConfirmation::SENDER_VOUCHES[] = // urn:oasis:names:tc:SAML:2.0:cm:sender-vouches
1720 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1721 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1722 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1723 chLatin_c, chLatin_m, chColon, chLatin_s, chLatin_e, chLatin_n, chLatin_d, chLatin_e, chLatin_r, chDash,
1724 chLatin_v, chLatin_o, chLatin_u, chLatin_c, chLatin_h, chLatin_e, chLatin_s, chNull
1727 const XMLCh Action::RWEDC_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:rwedc
1728 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1729 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1730 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1731 chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1732 chLatin_r, chLatin_w, chLatin_e, chLatin_d, chLatin_c, chNull
1735 const XMLCh Action::RWEDC_NEG_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:rwedc-negation
1736 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1737 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1738 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1739 chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1740 chLatin_r, chLatin_w, chLatin_e, chLatin_d, chLatin_c, chDash,
1741 chLatin_n, chLatin_e, chLatin_g, chLatin_a, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chNull
1744 const XMLCh Action::GHPP_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:ghpp
1745 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1746 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1747 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1748 chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1749 chLatin_g, chLatin_h, chLatin_p, chLatin_p, chNull
1752 const XMLCh Action::UNIX_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:unix
1753 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1754 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1755 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1756 chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1757 chLatin_u, chLatin_n, chLatin_i, chLatin_x, chNull
1760 const XMLCh Attribute::UNSPECIFIED[] = // urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified
1761 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1762 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1763 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1764 chLatin_a, chLatin_t, chLatin_t, chLatin_r, chLatin_n, chLatin_a, chLatin_m, chLatin_e, chDash,
1765 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1766 chLatin_u, chLatin_n, chLatin_s, chLatin_p, chLatin_e, chLatin_c, chLatin_i, chLatin_f, chLatin_i, chLatin_e, chLatin_d, chLatin_d, chNull
1769 const XMLCh Attribute::URI_REFERENCE[] = // urn:oasis:names:tc:SAML:2.0:attrname-format:uri
1770 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1771 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1772 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1773 chLatin_a, chLatin_t, chLatin_t, chLatin_r, chLatin_n, chLatin_a, chLatin_m, chLatin_e, chDash,
1774 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1775 chLatin_u, chLatin_r, chLatin_i, chNull
1778 const XMLCh Attribute::BASIC[] = // urn:oasis:names:tc:SAML:2.0:attrname-format:basic
1779 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1780 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1781 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1782 chLatin_a, chLatin_t, chLatin_t, chLatin_r, chLatin_n, chLatin_a, chLatin_m, chLatin_e, chDash,
1783 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1784 chLatin_b, chLatin_a, chLatin_s, chLatin_i, chLatin_c, chNull