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/encryption/Decrypter.h>
31 #include <xmltooling/impl/AnyElement.h>
32 #include <xmltooling/io/AbstractXMLObjectMarshaller.h>
33 #include <xmltooling/io/AbstractXMLObjectUnmarshaller.h>
34 #include <xmltooling/util/XMLHelper.h>
37 #include <xercesc/util/XMLUniDefs.hpp>
39 using namespace opensaml::saml2;
40 using namespace xmlencryption;
41 using namespace xmlsignature;
42 using namespace xmltooling;
44 using xmlconstants::XMLSIG_NS;
45 using xmlconstants::XMLENC_NS;
46 using samlconstants::SAML20_NS;
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 AbstractDOMCachingXMLObject,
66 public AbstractXMLObjectMarshaller,
67 public AbstractXMLObjectUnmarshaller
70 m_Format=m_SPProvidedID=m_NameQualifier=m_SPNameQualifier=NULL;
79 virtual ~NameIDTypeImpl() {
80 XMLString::release(&m_NameQualifier);
81 XMLString::release(&m_SPNameQualifier);
82 XMLString::release(&m_Format);
83 XMLString::release(&m_SPProvidedID);
86 NameIDTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
87 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
91 NameIDTypeImpl(const NameIDTypeImpl& src)
92 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
94 setNameQualifier(src.getNameQualifier());
95 setSPNameQualifier(src.getSPNameQualifier());
96 setFormat(src.getFormat());
97 setSPProvidedID(src.getSPProvidedID());
100 IMPL_XMLOBJECT_CLONE(NameIDType);
101 IMPL_STRING_ATTRIB(NameQualifier);
102 IMPL_STRING_ATTRIB(SPNameQualifier);
103 IMPL_STRING_ATTRIB(Format);
104 IMPL_STRING_ATTRIB(SPProvidedID);
107 void marshallAttributes(DOMElement* domElement) const {
108 MARSHALL_STRING_ATTRIB(NameQualifier,NAMEQUALIFIER,NULL);
109 MARSHALL_STRING_ATTRIB(SPNameQualifier,SPNAMEQUALIFIER,NULL);
110 MARSHALL_STRING_ATTRIB(Format,FORMAT,NULL);
111 MARSHALL_STRING_ATTRIB(SPProvidedID,SPPROVIDEDID,NULL);
114 void processAttribute(const DOMAttr* attribute) {
115 PROC_STRING_ATTRIB(NameQualifier,NAMEQUALIFIER,NULL);
116 PROC_STRING_ATTRIB(SPNameQualifier,SPNAMEQUALIFIER,NULL);
117 PROC_STRING_ATTRIB(Format,FORMAT,NULL);
118 PROC_STRING_ATTRIB(SPProvidedID,SPPROVIDEDID,NULL);
119 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
123 class SAML_DLLLOCAL NameIDImpl : public virtual NameID, public NameIDTypeImpl
126 virtual ~NameIDImpl() {}
128 NameIDImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
129 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
131 NameIDImpl(const NameIDImpl& src) : AbstractXMLObject(src), NameIDTypeImpl(src) {}
133 IMPL_XMLOBJECT_CLONE(NameID);
134 NameIDType* cloneNameIDType() const {
135 return new NameIDImpl(*this);
139 class SAML_DLLLOCAL IssuerImpl : public virtual Issuer, public NameIDTypeImpl
142 virtual ~IssuerImpl() {}
144 IssuerImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
145 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
147 IssuerImpl(const IssuerImpl& src) : AbstractXMLObject(src), NameIDTypeImpl(src) {}
149 IMPL_XMLOBJECT_CLONE(Issuer);
150 NameIDType* cloneNameIDType() const {
151 return new IssuerImpl(*this);
155 //TODO unit test for this
156 // - need to test encryption/decryption too, or already done in xmltooling ?
157 class SAML_DLLLOCAL EncryptedElementTypeImpl : public virtual EncryptedElementType,
158 public AbstractComplexElement,
159 public AbstractDOMCachingXMLObject,
160 public AbstractXMLObjectMarshaller,
161 public AbstractXMLObjectUnmarshaller
164 m_EncryptedData=NULL;
165 m_children.push_back(NULL);
166 m_pos_EncryptedData=m_children.begin();
170 EncryptedElementTypeImpl() {
175 virtual ~EncryptedElementTypeImpl() {}
177 EncryptedElementTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
178 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
182 EncryptedElementTypeImpl(const EncryptedElementTypeImpl& src)
183 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
185 if (src.getEncryptedData())
186 setEncryptedData(src.getEncryptedData()->cloneEncryptedData());
187 VectorOf(EncryptedKey) v=getEncryptedKeys();
188 for (vector<EncryptedKey*>::const_iterator i=src.m_EncryptedKeys.begin(); i!=src.m_EncryptedKeys.end(); i++) {
190 v.push_back((*i)->cloneEncryptedKey());
195 XMLObject* decrypt(KeyResolver* KEKresolver, const XMLCh* recipient) const
197 if (!m_EncryptedData)
198 throw DecryptionException("No encrypted data present.");
199 Decrypter decrypter(KEKresolver, new EncryptedKeyResolver(*this, recipient));
200 DOMDocumentFragment* frag = decrypter.decryptData(m_EncryptedData);
201 if (frag->hasChildNodes() && frag->getFirstChild()==frag->getLastChild()) {
202 DOMNode* plaintext=frag->getFirstChild();
203 if (plaintext->getNodeType()==DOMNode::ELEMENT_NODE) {
204 auto_ptr<XMLObject> ret(XMLObjectBuilder::buildOneFromElement(static_cast<DOMElement*>(plaintext)));
205 ret->releaseThisAndChildrenDOM();
206 return ret.release();
210 throw DecryptionException("Decryption did not result in a single element.");
213 IMPL_XMLOBJECT_CLONE(EncryptedElementType);
214 IMPL_TYPED_FOREIGN_CHILD(EncryptedData,xmlencryption);
215 IMPL_TYPED_FOREIGN_CHILDREN(EncryptedKey,xmlencryption,m_children.end());
218 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
219 PROC_TYPED_FOREIGN_CHILD(EncryptedData,xmlencryption,XMLENC_NS,false);
220 PROC_TYPED_FOREIGN_CHILDREN(EncryptedKey,xmlencryption,XMLENC_NS,false);
221 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
225 //TODO unit test for this
226 class SAML_DLLLOCAL EncryptedIDImpl : public virtual EncryptedID, public EncryptedElementTypeImpl
229 virtual ~EncryptedIDImpl() {}
231 EncryptedIDImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
232 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
234 EncryptedIDImpl(const EncryptedIDImpl& src) : AbstractXMLObject(src), EncryptedElementTypeImpl(src) {}
236 IMPL_XMLOBJECT_CLONE(EncryptedID);
237 EncryptedElementType* cloneEncryptedElementType() const {
238 return new EncryptedIDImpl(*this);
242 class SAML_DLLLOCAL AudienceRestrictionImpl : public virtual AudienceRestriction,
243 public AbstractComplexElement,
244 public AbstractDOMCachingXMLObject,
245 public AbstractXMLObjectMarshaller,
246 public AbstractXMLObjectUnmarshaller
249 virtual ~AudienceRestrictionImpl() {}
251 AudienceRestrictionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
252 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
255 AudienceRestrictionImpl(const AudienceRestrictionImpl& src)
256 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
257 VectorOf(Audience) v=getAudiences();
258 for (vector<Audience*>::const_iterator i=src.m_Audiences.begin(); i!=src.m_Audiences.end(); i++) {
260 v.push_back((*i)->cloneAudience());
265 IMPL_XMLOBJECT_CLONE(AudienceRestriction);
266 Condition* cloneCondition() const {
267 return cloneAudienceRestriction();
269 IMPL_TYPED_CHILDREN(Audience,m_children.end());
272 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
273 PROC_TYPED_CHILDREN(Audience,SAML20_NS,false);
274 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
278 class SAML_DLLLOCAL OneTimeUseImpl : public virtual OneTimeUse,
279 public AbstractSimpleElement,
280 public AbstractDOMCachingXMLObject,
281 public AbstractXMLObjectMarshaller,
282 public AbstractXMLObjectUnmarshaller
285 virtual ~OneTimeUseImpl() {}
287 OneTimeUseImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
288 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
291 OneTimeUseImpl(const OneTimeUseImpl& src)
292 : AbstractXMLObject(src), AbstractSimpleElement(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)
318 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
319 setCount(src.m_Count);
320 VectorOf(Audience) v=getAudiences();
321 for (vector<Audience*>::const_iterator i=src.m_Audiences.begin(); i!=src.m_Audiences.end(); i++) {
323 v.push_back((*i)->cloneAudience());
328 IMPL_XMLOBJECT_CLONE(ProxyRestriction);
329 Condition* cloneCondition() const {
330 return cloneProxyRestriction();
332 IMPL_TYPED_CHILDREN(Audience,m_children.end());
333 IMPL_INTEGER_ATTRIB(Count);
336 void marshallAttributes(DOMElement* domElement) const {
337 MARSHALL_INTEGER_ATTRIB(Count,COUNT,NULL);
340 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
341 PROC_TYPED_CHILDREN(Audience,SAML20_NS,false);
342 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
345 void processAttribute(const DOMAttr* attribute) {
346 PROC_INTEGER_ATTRIB(Count,COUNT,NULL);
347 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
352 class SAML_DLLLOCAL ConditionsImpl : public virtual Conditions,
353 public AbstractComplexElement,
354 public AbstractDOMCachingXMLObject,
355 public AbstractXMLObjectMarshaller,
356 public AbstractXMLObjectUnmarshaller
359 m_NotBefore=m_NotOnOrAfter=NULL;
362 virtual ~ConditionsImpl() {
364 delete m_NotOnOrAfter;
367 ConditionsImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
368 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
372 ConditionsImpl(const ConditionsImpl& src)
373 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
375 setNotBefore(src.getNotBefore());
376 setNotOnOrAfter(src.getNotOnOrAfter());
378 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
380 AudienceRestriction* arc=dynamic_cast<AudienceRestriction*>(*i);
382 getAudienceRestrictions().push_back(arc->cloneAudienceRestriction());
386 OneTimeUse* dncc=dynamic_cast<OneTimeUse*>(*i);
388 getOneTimeUses().push_back(dncc->cloneOneTimeUse());
392 ProxyRestriction* prc=dynamic_cast<ProxyRestriction*>(*i);
394 getProxyRestrictions().push_back(prc->cloneProxyRestriction());
398 Condition* c=dynamic_cast<Condition*>(*i);
400 getConditions().push_back(c->cloneCondition());
407 IMPL_XMLOBJECT_CLONE(Conditions);
408 IMPL_DATETIME_ATTRIB(NotBefore,0);
409 IMPL_DATETIME_ATTRIB(NotOnOrAfter,SAMLTIME_MAX);
410 IMPL_TYPED_CHILDREN(AudienceRestriction, m_children.end());
411 IMPL_TYPED_CHILDREN(OneTimeUse,m_children.end());
412 IMPL_TYPED_CHILDREN(ProxyRestriction, m_children.end());
413 IMPL_TYPED_CHILDREN(Condition,m_children.end());
416 void marshallAttributes(DOMElement* domElement) const {
417 MARSHALL_DATETIME_ATTRIB(NotBefore,NOTBEFORE,NULL);
418 MARSHALL_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,NULL);
421 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
422 PROC_TYPED_CHILDREN(AudienceRestriction,SAML20_NS,false);
423 PROC_TYPED_CHILDREN(OneTimeUse,SAML20_NS,false);
424 PROC_TYPED_CHILDREN(ProxyRestriction,SAML20_NS,false);
425 PROC_TYPED_CHILDREN(Condition,SAML20_NS,false);
426 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
429 void processAttribute(const DOMAttr* attribute) {
430 PROC_DATETIME_ATTRIB(NotBefore,NOTBEFORE,NULL);
431 PROC_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,NULL);
432 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
436 class SAML_DLLLOCAL SubjectConfirmationDataImpl : public virtual SubjectConfirmationData, public AnyElementImpl
439 m_NotBefore=m_NotOnOrAfter=NULL;
440 m_Recipient=m_InResponseTo=m_Address=NULL;
443 virtual ~SubjectConfirmationDataImpl() {
445 delete m_NotOnOrAfter;
446 XMLString::release(&m_Recipient);
447 XMLString::release(&m_InResponseTo);
448 XMLString::release(&m_Address);
451 SubjectConfirmationDataImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
452 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
456 SubjectConfirmationDataImpl(const SubjectConfirmationDataImpl& src) : AnyElementImpl(src) {
458 setNotBefore(src.getNotBefore());
459 setNotOnOrAfter(src.getNotOnOrAfter());
460 setRecipient(src.getRecipient());
461 setInResponseTo(src.getInResponseTo());
462 setAddress(src.getAddress());
465 IMPL_XMLOBJECT_CLONE(SubjectConfirmationData);
466 IMPL_DATETIME_ATTRIB(NotBefore,0);
467 IMPL_DATETIME_ATTRIB(NotOnOrAfter,SAMLTIME_MAX);
468 IMPL_STRING_ATTRIB(Recipient);
469 IMPL_STRING_ATTRIB(InResponseTo);
470 IMPL_STRING_ATTRIB(Address);
473 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
474 if (!qualifiedName.hasNamespaceURI()) {
475 if (XMLString::equals(qualifiedName.getLocalPart(),NOTBEFORE_ATTRIB_NAME)) {
479 else if (XMLString::equals(qualifiedName.getLocalPart(),NOTONORAFTER_ATTRIB_NAME)) {
480 setNotOnOrAfter(value);
483 else if (XMLString::equals(qualifiedName.getLocalPart(),RECIPIENT_ATTRIB_NAME)) {
487 else if (XMLString::equals(qualifiedName.getLocalPart(),INRESPONSETO_ATTRIB_NAME)) {
488 setInResponseTo(value);
491 else if (XMLString::equals(qualifiedName.getLocalPart(),ADDRESS_ATTRIB_NAME)) {
496 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
500 void marshallAttributes(DOMElement* domElement) const {
501 MARSHALL_DATETIME_ATTRIB(NotBefore,NOTBEFORE,NULL);
502 MARSHALL_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,NULL);
503 MARSHALL_STRING_ATTRIB(Recipient,RECIPIENT,NULL);
504 MARSHALL_STRING_ATTRIB(InResponseTo,INRESPONSETO,NULL);
505 MARSHALL_STRING_ATTRIB(Address,ADDRESS,NULL);
506 AnyElementImpl::marshallAttributes(domElement);
509 // The processAttributes hook is handled by AnyElementImpl
512 class SAML_DLLLOCAL KeyInfoConfirmationDataTypeImpl : public virtual KeyInfoConfirmationDataType,
513 public AbstractComplexElement,
514 public AbstractAttributeExtensibleXMLObject,
515 public AbstractDOMCachingXMLObject,
516 public AbstractXMLObjectMarshaller,
517 public AbstractXMLObjectUnmarshaller
520 m_NotBefore=m_NotOnOrAfter=NULL;
521 m_Recipient=m_InResponseTo=m_Address=NULL;
524 virtual ~KeyInfoConfirmationDataTypeImpl() {
526 delete m_NotOnOrAfter;
527 XMLString::release(&m_Recipient);
528 XMLString::release(&m_InResponseTo);
529 XMLString::release(&m_Address);
532 KeyInfoConfirmationDataTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
533 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
537 KeyInfoConfirmationDataTypeImpl(const KeyInfoConfirmationDataTypeImpl& src)
538 : AbstractXMLObject(src), AbstractComplexElement(src),
539 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
541 setNotBefore(src.getNotBefore());
542 setNotOnOrAfter(src.getNotOnOrAfter());
543 setRecipient(src.getRecipient());
544 setInResponseTo(src.getInResponseTo());
545 setAddress(src.getAddress());
546 VectorOf(KeyInfo) v=getKeyInfos();
547 for (vector<KeyInfo*>::const_iterator i=src.m_KeyInfos.begin(); i!=src.m_KeyInfos.end(); ++i)
548 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,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)
642 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
644 setMethod(src.getMethod());
646 setBaseID(src.getBaseID()->cloneBaseID());
648 setNameID(src.getNameID()->cloneNameID());
649 if (src.getEncryptedID())
650 setEncryptedID(src.getEncryptedID()->cloneEncryptedID());
651 if (src.getSubjectConfirmationData())
652 setSubjectConfirmationData(src.getSubjectConfirmationData()->clone());
653 if (src.getKeyInfoConfirmationDataType())
654 setKeyInfoConfirmationDataType(src.getKeyInfoConfirmationDataType()->cloneKeyInfoConfirmationDataType());
657 IMPL_XMLOBJECT_CLONE(SubjectConfirmation);
658 IMPL_STRING_ATTRIB(Method);
659 IMPL_TYPED_CHILD(BaseID);
660 IMPL_TYPED_CHILD(NameID);
661 IMPL_TYPED_CHILD(EncryptedID);
662 IMPL_XMLOBJECT_CHILD(SubjectConfirmationData);
663 IMPL_TYPED_CHILD(KeyInfoConfirmationDataType);
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_TYPED_CHILD(KeyInfoConfirmationDataType,SAML20_NS,false);
675 PROC_XMLOBJECT_CHILD(SubjectConfirmationData,SAML20_NS);
676 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
679 void processAttribute(const DOMAttr* attribute) {
680 PROC_STRING_ATTRIB(Method,METHOD,NULL);
681 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
685 class SAML_DLLLOCAL SubjectImpl : public virtual Subject,
686 public AbstractComplexElement,
687 public AbstractDOMCachingXMLObject,
688 public AbstractXMLObjectMarshaller,
689 public AbstractXMLObjectUnmarshaller
695 m_children.push_back(NULL);
696 m_children.push_back(NULL);
697 m_children.push_back(NULL);
698 m_pos_BaseID=m_children.begin();
699 m_pos_NameID=m_pos_BaseID;
701 m_pos_EncryptedID=m_pos_NameID;
705 virtual ~SubjectImpl() {}
707 SubjectImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
708 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
712 SubjectImpl(const SubjectImpl& src)
713 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
716 setBaseID(src.getBaseID()->cloneBaseID());
718 setNameID(src.getNameID()->cloneNameID());
719 if (src.getEncryptedID())
720 setEncryptedID(src.getEncryptedID()->cloneEncryptedID());
721 VectorOf(SubjectConfirmation) v=getSubjectConfirmations();
722 for (vector<SubjectConfirmation*>::const_iterator i=src.m_SubjectConfirmations.begin(); i!=src.m_SubjectConfirmations.end(); i++) {
724 v.push_back((*i)->cloneSubjectConfirmation());
729 IMPL_XMLOBJECT_CLONE(Subject);
730 IMPL_TYPED_CHILD(NameID);
731 IMPL_TYPED_CHILD(BaseID);
732 IMPL_TYPED_CHILD(EncryptedID);
733 IMPL_TYPED_CHILDREN(SubjectConfirmation,m_children.end());
736 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
737 PROC_TYPED_CHILD(BaseID,SAML20_NS,false);
738 PROC_TYPED_CHILD(NameID,SAML20_NS,false);
739 PROC_TYPED_CHILD(EncryptedID,SAML20_NS,false);
740 PROC_TYPED_CHILDREN(SubjectConfirmation,SAML20_NS,false);
741 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
745 class SAML_DLLLOCAL SubjectLocalityImpl : public virtual SubjectLocality,
746 public AbstractSimpleElement,
747 public AbstractDOMCachingXMLObject,
748 public AbstractXMLObjectMarshaller,
749 public AbstractXMLObjectUnmarshaller
752 m_Address=m_DNSName=NULL;
755 virtual ~SubjectLocalityImpl() {
756 XMLString::release(&m_Address);
757 XMLString::release(&m_DNSName);
760 SubjectLocalityImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
761 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
765 SubjectLocalityImpl(const SubjectLocalityImpl& src)
766 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
768 setAddress(src.getAddress());
769 setDNSName(src.getDNSName());
772 IMPL_XMLOBJECT_CLONE(SubjectLocality);
773 IMPL_STRING_ATTRIB(Address);
774 IMPL_STRING_ATTRIB(DNSName);
777 void marshallAttributes(DOMElement* domElement) const {
778 MARSHALL_STRING_ATTRIB(Address,ADDRESS,NULL);
779 MARSHALL_STRING_ATTRIB(DNSName,DNSNAME,NULL);
782 void processAttribute(const DOMAttr* attribute) {
783 PROC_STRING_ATTRIB(Address,ADDRESS,NULL);
784 PROC_STRING_ATTRIB(DNSName,DNSNAME,NULL);
785 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
789 //TODO need unit test for this
790 class SAML_DLLLOCAL AuthnContextDeclImpl : public virtual AuthnContextDecl, public AnyElementImpl
793 virtual ~AuthnContextDeclImpl() {}
795 AuthnContextDeclImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
796 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
799 AuthnContextDeclImpl(const AuthnContextDeclImpl& src) : AnyElementImpl(src) {
802 IMPL_XMLOBJECT_CLONE(AuthnContextDecl);
805 class SAML_DLLLOCAL AuthnContextImpl : public virtual AuthnContext,
806 public AbstractComplexElement,
807 public AbstractDOMCachingXMLObject,
808 public AbstractXMLObjectMarshaller,
809 public AbstractXMLObjectUnmarshaller
812 m_AuthnContextClassRef=NULL;
813 m_AuthnContextDecl=NULL;
814 m_AuthnContextDeclRef=NULL;
815 m_children.push_back(NULL);
816 m_children.push_back(NULL);
817 m_children.push_back(NULL);
818 m_pos_AuthnContextClassRef=m_children.begin();
819 m_pos_AuthnContextDecl=m_pos_AuthnContextClassRef;
820 ++m_pos_AuthnContextDecl;
821 m_pos_AuthnContextDeclRef=m_pos_AuthnContextDecl;
822 ++m_pos_AuthnContextDeclRef;
825 virtual ~AuthnContextImpl() {}
827 AuthnContextImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
828 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
832 AuthnContextImpl(const AuthnContextImpl& src)
833 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
835 if (src.getAuthnContextClassRef())
836 setAuthnContextClassRef(src.getAuthnContextClassRef()->cloneAuthnContextClassRef());
837 if (src.getAuthnContextDecl())
838 setAuthnContextDecl(src.getAuthnContextDecl()->clone());
839 if (src.getAuthnContextDeclRef())
840 setAuthnContextDeclRef(src.getAuthnContextDeclRef()->cloneAuthnContextDeclRef());
841 VectorOf(AuthenticatingAuthority) v=getAuthenticatingAuthoritys();
842 for (vector<AuthenticatingAuthority*>::const_iterator i=src.m_AuthenticatingAuthoritys.begin(); i!=src.m_AuthenticatingAuthoritys.end(); i++) {
844 v.push_back((*i)->cloneAuthenticatingAuthority());
849 IMPL_XMLOBJECT_CLONE(AuthnContext);
850 IMPL_TYPED_CHILD(AuthnContextClassRef);
851 IMPL_XMLOBJECT_CHILD(AuthnContextDecl);
852 IMPL_TYPED_CHILD(AuthnContextDeclRef);
853 IMPL_TYPED_CHILDREN(AuthenticatingAuthority,m_children.end());
856 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
857 PROC_TYPED_CHILD(AuthnContextClassRef,SAML20_NS,false);
858 PROC_XMLOBJECT_CHILD(AuthnContextDecl,SAML20_NS);
859 PROC_TYPED_CHILD(AuthnContextDeclRef,SAML20_NS,false);
860 PROC_TYPED_CHILDREN(AuthenticatingAuthority,SAML20_NS,false);
861 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
865 class SAML_DLLLOCAL AuthnStatementImpl : public virtual AuthnStatement,
866 public AbstractComplexElement,
867 public AbstractDOMCachingXMLObject,
868 public AbstractXMLObjectMarshaller,
869 public AbstractXMLObjectUnmarshaller
874 m_SessionNotOnOrAfter=NULL;
875 m_SubjectLocality=NULL;
877 m_children.push_back(NULL);
878 m_children.push_back(NULL);
879 m_pos_SubjectLocality=m_children.begin();
880 m_pos_AuthnContext=m_pos_SubjectLocality;
881 ++m_pos_AuthnContext;
884 virtual ~AuthnStatementImpl() {
885 delete m_AuthnInstant;
886 XMLString::release(&m_SessionIndex);
887 delete m_SessionNotOnOrAfter;
890 AuthnStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
891 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
895 AuthnStatementImpl(const AuthnStatementImpl& src)
896 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
898 setAuthnInstant(src.getAuthnInstant());
899 setSessionIndex(src.getSessionIndex());
900 setSessionNotOnOrAfter(src.getSessionNotOnOrAfter());
901 if (src.getSubjectLocality())
902 setSubjectLocality(src.getSubjectLocality()->cloneSubjectLocality());
903 if (src.getAuthnContext())
904 setAuthnContext(src.getAuthnContext()->cloneAuthnContext());
907 IMPL_XMLOBJECT_CLONE(AuthnStatement);
908 Statement* cloneStatement() const {
909 return cloneAuthnStatement();
911 IMPL_DATETIME_ATTRIB(AuthnInstant,0);
912 IMPL_STRING_ATTRIB(SessionIndex);
913 IMPL_DATETIME_ATTRIB(SessionNotOnOrAfter,SAMLTIME_MAX);
914 IMPL_TYPED_CHILD(SubjectLocality);
915 IMPL_TYPED_CHILD(AuthnContext);
918 void marshallAttributes(DOMElement* domElement) const {
919 MARSHALL_DATETIME_ATTRIB(AuthnInstant,AUTHNINSTANT,NULL);
920 MARSHALL_STRING_ATTRIB(SessionIndex,SESSIONINDEX,NULL);
921 MARSHALL_DATETIME_ATTRIB(SessionNotOnOrAfter,SESSIONNOTONORAFTER,NULL);
924 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
925 PROC_TYPED_CHILD(SubjectLocality,SAML20_NS,false);
926 PROC_TYPED_CHILD(AuthnContext,SAML20_NS,false);
927 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
930 void processAttribute(const DOMAttr* attribute) {
931 PROC_DATETIME_ATTRIB(AuthnInstant,AUTHNINSTANT,NULL);
932 PROC_STRING_ATTRIB(SessionIndex,SESSIONINDEX,NULL);
933 PROC_DATETIME_ATTRIB(SessionNotOnOrAfter,SESSIONNOTONORAFTER,NULL);
934 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
938 class SAML_DLLLOCAL ActionImpl : public virtual Action,
939 public AbstractSimpleElement,
940 public AbstractDOMCachingXMLObject,
941 public AbstractXMLObjectMarshaller,
942 public AbstractXMLObjectUnmarshaller
945 virtual ~ActionImpl() {
946 XMLString::release(&m_Namespace);
949 ActionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
950 : AbstractXMLObject(nsURI, localName, prefix, schemaType), m_Namespace(NULL) {
953 ActionImpl(const ActionImpl& src)
954 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
955 setNamespace(src.getNamespace());
958 IMPL_XMLOBJECT_CLONE(Action);
959 IMPL_STRING_ATTRIB(Namespace);
962 void marshallAttributes(DOMElement* domElement) const {
963 MARSHALL_STRING_ATTRIB(Namespace,NAMESPACE,NULL);
966 void processAttribute(const DOMAttr* attribute) {
967 PROC_STRING_ATTRIB(Namespace,NAMESPACE,NULL);
968 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
972 class SAML_DLLLOCAL EvidenceImpl : public virtual Evidence,
973 public AbstractComplexElement,
974 public AbstractDOMCachingXMLObject,
975 public AbstractXMLObjectMarshaller,
976 public AbstractXMLObjectUnmarshaller
979 virtual ~EvidenceImpl() {}
981 EvidenceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
982 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
985 EvidenceImpl(const EvidenceImpl& src)
986 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
987 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
989 AssertionIDRef* ref=dynamic_cast<AssertionIDRef*>(*i);
991 getAssertionIDRefs().push_back(ref->cloneAssertionIDRef());
995 AssertionURIRef* uri=dynamic_cast<AssertionURIRef*>(*i);
997 getAssertionURIRefs().push_back(uri->cloneAssertionURIRef());
1001 Assertion* assertion=dynamic_cast<Assertion*>(*i);
1003 getAssertions().push_back(assertion->cloneAssertion());
1007 EncryptedAssertion* enc=dynamic_cast<EncryptedAssertion*>(*i);
1009 getEncryptedAssertions().push_back(enc->cloneEncryptedAssertion());
1016 IMPL_XMLOBJECT_CLONE(Evidence);
1017 IMPL_TYPED_CHILDREN(AssertionIDRef,m_children.end());
1018 IMPL_TYPED_CHILDREN(AssertionURIRef,m_children.end());
1019 IMPL_TYPED_CHILDREN(Assertion,m_children.end());
1020 IMPL_TYPED_CHILDREN(EncryptedAssertion,m_children.end());
1023 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1024 PROC_TYPED_CHILDREN(AssertionIDRef,SAML20_NS,false);
1025 PROC_TYPED_CHILDREN(AssertionURIRef,SAML20_NS,false);
1026 PROC_TYPED_CHILDREN(Assertion,SAML20_NS,false);
1027 PROC_TYPED_CHILDREN(EncryptedAssertion,SAML20_NS,false);
1028 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1032 class SAML_DLLLOCAL AuthzDecisionStatementImpl : public virtual AuthzDecisionStatement,
1033 public AbstractComplexElement,
1034 public AbstractDOMCachingXMLObject,
1035 public AbstractXMLObjectMarshaller,
1036 public AbstractXMLObjectUnmarshaller
1042 m_children.push_back(NULL);
1043 m_pos_Evidence=m_children.begin();
1046 virtual ~AuthzDecisionStatementImpl() {
1047 XMLString::release(&m_Resource);
1048 XMLString::release(&m_Decision);
1051 AuthzDecisionStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1052 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1056 AuthzDecisionStatementImpl(const AuthzDecisionStatementImpl& src)
1057 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
1059 setResource(src.getResource());
1060 setDecision(src.getDecision());
1061 if (src.getEvidence())
1062 setEvidence(src.getEvidence()->cloneEvidence());
1063 VectorOf(Action) v=getActions();
1064 for (vector<Action*>::const_iterator i=src.m_Actions.begin(); i!=src.m_Actions.end(); i++) {
1066 v.push_back((*i)->cloneAction());
1071 IMPL_XMLOBJECT_CLONE(AuthzDecisionStatement);
1072 Statement* cloneStatement() const {
1073 return cloneAuthzDecisionStatement();
1075 IMPL_STRING_ATTRIB(Resource);
1076 IMPL_STRING_ATTRIB(Decision);
1077 IMPL_TYPED_CHILD(Evidence);
1078 IMPL_TYPED_CHILDREN(Action, m_pos_Evidence);
1081 void marshallAttributes(DOMElement* domElement) const {
1082 MARSHALL_STRING_ATTRIB(Resource,RESOURCE,NULL);
1083 MARSHALL_STRING_ATTRIB(Decision,DECISION,NULL);
1086 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1087 PROC_TYPED_CHILD(Evidence,SAML20_NS,false);
1088 PROC_TYPED_CHILDREN(Action,SAML20_NS,false);
1089 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1092 void processAttribute(const DOMAttr* attribute) {
1093 PROC_STRING_ATTRIB(Resource,RESOURCE,NULL);
1094 PROC_STRING_ATTRIB(Decision,DECISION,NULL);
1095 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
1099 //TODO need unit test for this
1100 class SAML_DLLLOCAL AttributeValueImpl : public virtual AttributeValue, public AnyElementImpl
1103 virtual ~AttributeValueImpl() {}
1105 AttributeValueImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1106 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1109 AttributeValueImpl(const AttributeValueImpl& src) : AnyElementImpl(src) {
1112 IMPL_XMLOBJECT_CLONE(AttributeValue);
1116 class SAML_DLLLOCAL AttributeImpl : public virtual Attribute,
1117 public AbstractComplexElement,
1118 public AbstractAttributeExtensibleXMLObject,
1119 public AbstractDOMCachingXMLObject,
1120 public AbstractXMLObjectMarshaller,
1121 public AbstractXMLObjectUnmarshaller
1124 m_Name=m_NameFormat=m_FriendlyName=NULL;
1127 virtual ~AttributeImpl() {
1128 XMLString::release(&m_Name);
1129 XMLString::release(&m_NameFormat);
1130 XMLString::release(&m_FriendlyName);
1133 AttributeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1134 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1138 AttributeImpl(const AttributeImpl& src)
1139 : AbstractXMLObject(src), AbstractComplexElement(src),
1140 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
1142 setName(src.getName());
1143 setNameFormat(src.getNameFormat());
1144 setFriendlyName(src.getFriendlyName());
1145 VectorOf(XMLObject) v=getAttributeValues();
1146 for (vector<XMLObject*>::const_iterator i=src.m_AttributeValues.begin(); i!=src.m_AttributeValues.end(); i++) {
1148 v.push_back((*i)->clone());
1153 IMPL_XMLOBJECT_CLONE(Attribute);
1154 IMPL_STRING_ATTRIB(Name);
1155 IMPL_STRING_ATTRIB(NameFormat);
1156 IMPL_STRING_ATTRIB(FriendlyName);
1157 IMPL_XMLOBJECT_CHILDREN(AttributeValue,m_children.end());
1159 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
1160 if (!qualifiedName.hasNamespaceURI()) {
1161 if (XMLString::equals(qualifiedName.getLocalPart(),NAME_ATTRIB_NAME)) {
1165 else if (XMLString::equals(qualifiedName.getLocalPart(),NAMEFORMAT_ATTRIB_NAME)) {
1166 setNameFormat(value);
1169 else if (XMLString::equals(qualifiedName.getLocalPart(),FRIENDLYNAME_ATTRIB_NAME)) {
1170 setFriendlyName(value);
1174 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
1178 void marshallAttributes(DOMElement* domElement) const {
1179 MARSHALL_STRING_ATTRIB(Name,NAME,NULL);
1180 MARSHALL_STRING_ATTRIB(NameFormat,NAMEFORMAT,NULL);
1181 MARSHALL_STRING_ATTRIB(FriendlyName,FRIENDLYNAME,NULL);
1182 marshallExtensionAttributes(domElement);
1185 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1186 getAttributeValues().push_back(childXMLObject);
1189 void processAttribute(const DOMAttr* attribute) {
1190 unmarshallExtensionAttribute(attribute);
1194 //TODO unit test for this
1195 class SAML_DLLLOCAL EncryptedAttributeImpl : public virtual EncryptedAttribute, public EncryptedElementTypeImpl
1198 virtual ~EncryptedAttributeImpl() {}
1200 EncryptedAttributeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1201 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1203 EncryptedAttributeImpl(const EncryptedAttributeImpl& src) : AbstractXMLObject(src), EncryptedElementTypeImpl(src) {}
1205 IMPL_XMLOBJECT_CLONE(EncryptedAttribute);
1206 EncryptedElementType* cloneEncryptedElementType() const {
1207 return new EncryptedAttributeImpl(*this);
1211 class SAML_DLLLOCAL AttributeStatementImpl : public virtual AttributeStatement,
1212 public AbstractComplexElement,
1213 public AbstractDOMCachingXMLObject,
1214 public AbstractXMLObjectMarshaller,
1215 public AbstractXMLObjectUnmarshaller
1218 virtual ~AttributeStatementImpl() {}
1220 AttributeStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1221 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1224 AttributeStatementImpl(const AttributeStatementImpl& src)
1225 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
1226 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
1228 Attribute* attribute=dynamic_cast<Attribute*>(*i);
1230 getAttributes().push_back(attribute->cloneAttribute());
1234 EncryptedAttribute* enc=dynamic_cast<EncryptedAttribute*>(*i);
1236 getEncryptedAttributes().push_back(enc->cloneEncryptedAttribute());
1243 IMPL_XMLOBJECT_CLONE(AttributeStatement);
1244 Statement* cloneStatement() const {
1245 return cloneAttributeStatement();
1247 IMPL_TYPED_CHILDREN(Attribute, m_children.end());
1248 IMPL_TYPED_CHILDREN(EncryptedAttribute, m_children.end());
1251 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1252 PROC_TYPED_CHILDREN(Attribute,SAML20_NS,false);
1253 PROC_TYPED_CHILDREN(EncryptedAttribute,SAML20_NS,false);
1254 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1258 class SAML_DLLLOCAL AdviceImpl : public virtual Advice,
1259 public AbstractComplexElement,
1260 public AbstractDOMCachingXMLObject,
1261 public AbstractXMLObjectMarshaller,
1262 public AbstractXMLObjectUnmarshaller
1265 virtual ~AdviceImpl() {}
1267 AdviceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1268 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1271 AdviceImpl(const AdviceImpl& src)
1272 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
1273 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
1275 AssertionIDRef* ref=dynamic_cast<AssertionIDRef*>(*i);
1277 getAssertionIDRefs().push_back(ref->cloneAssertionIDRef());
1281 AssertionURIRef* uri=dynamic_cast<AssertionURIRef*>(*i);
1283 getAssertionURIRefs().push_back(uri->cloneAssertionURIRef());
1287 Assertion* assertion=dynamic_cast<Assertion*>(*i);
1289 getAssertions().push_back(assertion->cloneAssertion());
1293 EncryptedAssertion* enc=dynamic_cast<EncryptedAssertion*>(*i);
1295 getEncryptedAssertions().push_back(enc->cloneEncryptedAssertion());
1299 getUnknownXMLObjects().push_back((*i)->clone());
1304 IMPL_XMLOBJECT_CLONE(Advice);
1305 IMPL_TYPED_CHILDREN(AssertionIDRef,m_children.end());
1306 IMPL_TYPED_CHILDREN(AssertionURIRef,m_children.end());
1307 IMPL_TYPED_CHILDREN(Assertion,m_children.end());
1308 IMPL_TYPED_CHILDREN(EncryptedAssertion,m_children.end());
1309 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
1312 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1313 PROC_TYPED_CHILDREN(AssertionIDRef,SAML20_NS,false);
1314 PROC_TYPED_CHILDREN(AssertionURIRef,SAML20_NS,false);
1315 PROC_TYPED_CHILDREN(Assertion,SAML20_NS,false);
1316 PROC_TYPED_CHILDREN(EncryptedAssertion,SAML20_NS,false);
1319 const XMLCh* nsURI=root->getNamespaceURI();
1320 if (!XMLString::equals(nsURI,SAML20_NS) && nsURI && *nsURI) {
1321 getUnknownXMLObjects().push_back(childXMLObject);
1325 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1329 //TODO unit test for this
1330 class SAML_DLLLOCAL EncryptedAssertionImpl : public virtual EncryptedAssertion, public EncryptedElementTypeImpl
1333 virtual ~EncryptedAssertionImpl() {}
1335 EncryptedAssertionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1336 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1338 EncryptedAssertionImpl(const EncryptedAssertionImpl& src) : AbstractXMLObject(src), EncryptedElementTypeImpl(src) {}
1340 IMPL_XMLOBJECT_CLONE(EncryptedAssertion);
1341 EncryptedElementType* cloneEncryptedElementType() const {
1342 return new EncryptedAssertionImpl(*this);
1346 class SAML_DLLLOCAL AssertionImpl : public virtual Assertion,
1347 public AbstractComplexElement,
1348 public AbstractDOMCachingXMLObject,
1349 public AbstractXMLObjectMarshaller,
1350 public AbstractXMLObjectUnmarshaller
1355 m_IssueInstant=NULL;
1361 m_children.push_back(NULL);
1362 m_children.push_back(NULL);
1363 m_children.push_back(NULL);
1364 m_children.push_back(NULL);
1365 m_children.push_back(NULL);
1366 m_pos_Issuer=m_children.begin();
1367 m_pos_Signature=m_pos_Issuer;
1369 m_pos_Subject=m_pos_Signature;
1371 m_pos_Conditions=m_pos_Subject;
1373 m_pos_Advice=m_pos_Conditions;
1377 virtual ~AssertionImpl() {
1378 XMLString::release(&m_ID);
1379 XMLString::release(&m_Version);
1380 delete m_IssueInstant;
1383 AssertionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1384 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1388 AssertionImpl(const AssertionImpl& src)
1389 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
1391 setVersion(src.getVersion());
1393 setIssueInstant(src.getIssueInstant());
1394 if (src.getIssuer())
1395 setIssuer(src.getIssuer()->cloneIssuer());
1396 if (src.getSignature())
1397 setSignature(src.getSignature()->cloneSignature());
1398 if (src.getSubject())
1399 setSubject(src.getSubject()->cloneSubject());
1400 if (src.getConditions())
1401 setConditions(src.getConditions()->cloneConditions());
1402 if (src.getAdvice())
1403 setAdvice(src.getAdvice()->cloneAdvice());
1404 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
1406 AuthnStatement* authst=dynamic_cast<AuthnStatement*>(*i);
1408 getAuthnStatements().push_back(authst->cloneAuthnStatement());
1412 AttributeStatement* attst=dynamic_cast<AttributeStatement*>(*i);
1414 getAttributeStatements().push_back(attst->cloneAttributeStatement());
1418 AuthzDecisionStatement* authzst=dynamic_cast<AuthzDecisionStatement*>(*i);
1420 getAuthzDecisionStatements().push_back(authzst->cloneAuthzDecisionStatement());
1424 Statement* st=dynamic_cast<Statement*>(*i);
1426 getStatements().push_back(st->cloneStatement());
1433 //IMPL_TYPED_CHILD(Signature);
1434 // Need customized setter.
1436 Signature* m_Signature;
1437 list<XMLObject*>::iterator m_pos_Signature;
1439 Signature* getSignature() const {
1443 void setSignature(Signature* sig) {
1444 prepareForAssignment(m_Signature,sig);
1445 *m_pos_Signature=m_Signature=sig;
1446 // Sync content reference back up.
1448 m_Signature->setContentReference(new opensaml::ContentReference(*this));
1451 IMPL_XMLOBJECT_CLONE(Assertion);
1452 IMPL_STRING_ATTRIB(Version);
1454 IMPL_DATETIME_ATTRIB(IssueInstant,0);
1455 IMPL_TYPED_CHILD(Issuer);
1456 IMPL_TYPED_CHILD(Subject);
1457 IMPL_TYPED_CHILD(Conditions);
1458 IMPL_TYPED_CHILD(Advice);
1459 IMPL_TYPED_CHILDREN(Statement, m_children.end());
1460 IMPL_TYPED_CHILDREN(AuthnStatement, m_children.end());
1461 IMPL_TYPED_CHILDREN(AttributeStatement, m_children.end());
1462 IMPL_TYPED_CHILDREN(AuthzDecisionStatement, m_children.end());
1465 void marshallAttributes(DOMElement* domElement) const {
1467 const_cast<AssertionImpl*>(this)->m_Version=XMLString::transcode("2.0");
1468 MARSHALL_STRING_ATTRIB(Version,VER,NULL);
1470 const_cast<AssertionImpl*>(this)->m_ID=SAMLConfig::getConfig().generateIdentifier();
1471 MARSHALL_ID_ATTRIB(ID,ID,NULL);
1472 if (!m_IssueInstant) {
1473 const_cast<AssertionImpl*>(this)->m_IssueInstantEpoch=time(NULL);
1474 const_cast<AssertionImpl*>(this)->m_IssueInstant=new DateTime(m_IssueInstantEpoch);
1476 MARSHALL_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,NULL);
1479 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1480 PROC_TYPED_CHILD(Issuer,SAML20_NS,false);
1481 PROC_TYPED_CHILD(Signature,XMLSIG_NS,false);
1482 PROC_TYPED_CHILD(Subject,SAML20_NS,false);
1483 PROC_TYPED_CHILD(Conditions,SAML20_NS,false);
1484 PROC_TYPED_CHILD(Advice,SAML20_NS,false);
1485 PROC_TYPED_CHILDREN(AuthnStatement,SAML20_NS,false);
1486 PROC_TYPED_CHILDREN(AttributeStatement,SAML20_NS,false);
1487 PROC_TYPED_CHILDREN(AuthzDecisionStatement,SAML20_NS,false);
1488 PROC_TYPED_CHILDREN(Statement,SAML20_NS,false);
1489 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1492 void processAttribute(const DOMAttr* attribute) {
1493 PROC_STRING_ATTRIB(Version,VER,NULL);
1494 PROC_ID_ATTRIB(ID,ID,NULL);
1495 PROC_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,NULL);
1496 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
1503 #if defined (_MSC_VER)
1504 #pragma warning( pop )
1507 // Builder Implementations
1509 IMPL_XMLOBJECTBUILDER(Action);
1510 IMPL_XMLOBJECTBUILDER(Advice);
1511 IMPL_XMLOBJECTBUILDER(Assertion);
1512 IMPL_XMLOBJECTBUILDER(AssertionIDRef);
1513 IMPL_XMLOBJECTBUILDER(AssertionURIRef);
1514 IMPL_XMLOBJECTBUILDER(Attribute);
1515 IMPL_XMLOBJECTBUILDER(AttributeStatement);
1516 IMPL_XMLOBJECTBUILDER(AttributeValue);
1517 IMPL_XMLOBJECTBUILDER(Audience);
1518 IMPL_XMLOBJECTBUILDER(AudienceRestriction);
1519 IMPL_XMLOBJECTBUILDER(AuthenticatingAuthority);
1520 IMPL_XMLOBJECTBUILDER(AuthnContext);
1521 IMPL_XMLOBJECTBUILDER(AuthnContextClassRef);
1522 IMPL_XMLOBJECTBUILDER(AuthnContextDecl);
1523 IMPL_XMLOBJECTBUILDER(AuthnContextDeclRef);
1524 IMPL_XMLOBJECTBUILDER(AuthnStatement);
1525 IMPL_XMLOBJECTBUILDER(AuthzDecisionStatement);
1526 IMPL_XMLOBJECTBUILDER(Conditions);
1527 IMPL_XMLOBJECTBUILDER(EncryptedAssertion);
1528 IMPL_XMLOBJECTBUILDER(EncryptedAttribute);
1529 IMPL_XMLOBJECTBUILDER(EncryptedID);
1530 IMPL_XMLOBJECTBUILDER(Evidence);
1531 IMPL_XMLOBJECTBUILDER(Issuer);
1532 IMPL_XMLOBJECTBUILDER(KeyInfoConfirmationDataType);
1533 IMPL_XMLOBJECTBUILDER(NameID);
1534 IMPL_XMLOBJECTBUILDER(NameIDType);
1535 IMPL_XMLOBJECTBUILDER(OneTimeUse);
1536 IMPL_XMLOBJECTBUILDER(ProxyRestriction);
1537 IMPL_XMLOBJECTBUILDER(Subject);
1538 IMPL_XMLOBJECTBUILDER(SubjectConfirmation);
1539 IMPL_XMLOBJECTBUILDER(SubjectConfirmationData);
1540 IMPL_XMLOBJECTBUILDER(SubjectLocality);
1543 const XMLCh Action::LOCAL_NAME[] = UNICODE_LITERAL_6(A,c,t,i,o,n);
1544 const XMLCh Action::TYPE_NAME[] = UNICODE_LITERAL_10(A,c,t,i,o,n,T,y,p,e);
1545 const XMLCh Action::NAMESPACE_ATTRIB_NAME[] = UNICODE_LITERAL_9(N,a,m,e,s,p,a,c,e);
1546 const XMLCh Advice::LOCAL_NAME[] = UNICODE_LITERAL_6(A,d,v,i,c,e);
1547 const XMLCh Advice::TYPE_NAME[] = UNICODE_LITERAL_10(A,d,v,i,c,e,T,y,p,e);
1548 const XMLCh Assertion::LOCAL_NAME[] = UNICODE_LITERAL_9(A,s,s,e,r,t,i,o,n);
1549 const XMLCh Assertion::TYPE_NAME[] = UNICODE_LITERAL_13(A,s,s,e,r,t,i,o,n,T,y,p,e);
1550 const XMLCh Assertion::VER_ATTRIB_NAME[] = UNICODE_LITERAL_7(V,e,r,s,i,o,n);
1551 const XMLCh Assertion::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
1552 const XMLCh Assertion::ISSUEINSTANT_ATTRIB_NAME[] = UNICODE_LITERAL_12(I,s,s,u,e,I,n,s,t,a,n,t);
1553 const XMLCh AssertionIDRef::LOCAL_NAME[] = UNICODE_LITERAL_14(A,s,s,e,r,t,i,o,n,I,D,R,e,f);
1554 const XMLCh AssertionURIRef::LOCAL_NAME[] = UNICODE_LITERAL_15(A,s,s,e,r,t,i,o,n,U,R,I,R,e,f);
1555 const XMLCh Attribute::LOCAL_NAME[] = UNICODE_LITERAL_9(A,t,t,r,i,b,u,t,e);
1556 const XMLCh Attribute::TYPE_NAME[] = UNICODE_LITERAL_13(A,t,t,r,i,b,u,t,e,T,y,p,e);
1557 const XMLCh Attribute::NAME_ATTRIB_NAME[] = UNICODE_LITERAL_4(N,a,m,e);
1558 const XMLCh Attribute::NAMEFORMAT_ATTRIB_NAME[] = UNICODE_LITERAL_10(N,a,m,e,F,o,r,m,a,t);
1559 const XMLCh Attribute::FRIENDLYNAME_ATTRIB_NAME[] = UNICODE_LITERAL_12(F,r,i,e,n,d,l,y,N,a,m,e);
1560 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);
1561 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);
1562 const XMLCh AttributeValue::LOCAL_NAME[] = UNICODE_LITERAL_14(A,t,t,r,i,b,u,t,e,V,a,l,u,e);
1563 const XMLCh Audience::LOCAL_NAME[] = UNICODE_LITERAL_8(A,u,d,i,e,n,c,e);
1564 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);
1565 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);
1566 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);
1567 const XMLCh AuthnContext::LOCAL_NAME[] = UNICODE_LITERAL_12(A,u,t,h,n,C,o,n,t,e,x,t);
1568 const XMLCh AuthnContext::TYPE_NAME[] = UNICODE_LITERAL_16(A,u,t,h,n,C,o,n,t,e,x,t,T,y,p,e);
1569 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);
1570 const XMLCh AuthnContextDecl::LOCAL_NAME[] = UNICODE_LITERAL_16(A,u,t,h,n,C,o,n,t,e,x,t,D,e,c,l);
1571 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);
1572 const XMLCh AuthnStatement::LOCAL_NAME[] = UNICODE_LITERAL_14(A,u,t,h,n,S,t,a,t,e,m,e,n,t);
1573 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);
1574 const XMLCh AuthnStatement::AUTHNINSTANT_ATTRIB_NAME[] = UNICODE_LITERAL_12(A,u,t,h,n,I,n,s,t,a,n,t);
1575 const XMLCh AuthnStatement::SESSIONINDEX_ATTRIB_NAME[] = UNICODE_LITERAL_12(S,e,s,s,i,o,n,I,n,d,e,x);
1576 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);
1577 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);
1578 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);
1579 const XMLCh AuthzDecisionStatement::RESOURCE_ATTRIB_NAME[] = UNICODE_LITERAL_8(R,e,s,o,u,r,c,e);
1580 const XMLCh AuthzDecisionStatement::DECISION_ATTRIB_NAME[] = UNICODE_LITERAL_8(D,e,c,i,s,i,o,n);
1581 const XMLCh AuthzDecisionStatement::DECISION_PERMIT[] = UNICODE_LITERAL_6(P,e,r,m,i,t);
1582 const XMLCh AuthzDecisionStatement::DECISION_DENY[] = UNICODE_LITERAL_4(D,e,n,y);
1583 const XMLCh AuthzDecisionStatement::DECISION_INDETERMINATE[] = UNICODE_LITERAL_13(I,n,d,e,t,e,r,m,i,n,a,t,e);
1584 const XMLCh BaseID::LOCAL_NAME[] = UNICODE_LITERAL_6(B,a,s,e,I,D);
1585 const XMLCh BaseID::NAMEQUALIFIER_ATTRIB_NAME[] = UNICODE_LITERAL_13(N,a,m,e,Q,u,a,l,i,f,i,e,r);
1586 const XMLCh BaseID::SPNAMEQUALIFIER_ATTRIB_NAME[] = UNICODE_LITERAL_15(S,P,N,a,m,e,Q,u,a,l,i,f,i,e,r);
1587 const XMLCh Condition::LOCAL_NAME[] = UNICODE_LITERAL_9(C,o,n,d,i,t,i,o,n);
1588 const XMLCh Conditions::LOCAL_NAME[] = UNICODE_LITERAL_10(C,o,n,d,i,t,i,o,n,s);
1589 const XMLCh Conditions::TYPE_NAME[] = UNICODE_LITERAL_14(C,o,n,d,i,t,i,o,n,s,T,y,p,e);
1590 const XMLCh Conditions::NOTBEFORE_ATTRIB_NAME[] = UNICODE_LITERAL_9(N,o,t,B,e,f,o,r,e);
1591 const XMLCh Conditions::NOTONORAFTER_ATTRIB_NAME[] =UNICODE_LITERAL_12(N,o,t,O,n,O,r,A,f,t,e,r);
1592 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);
1593 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);
1594 const XMLCh EncryptedElementType::LOCAL_NAME[] = {chNull};
1595 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);
1596 const XMLCh EncryptedID::LOCAL_NAME[] = UNICODE_LITERAL_11(E,n,c,r,y,p,t,e,d,I,d);
1597 const XMLCh Evidence::LOCAL_NAME[] = UNICODE_LITERAL_8(E,v,i,d,e,n,c,e);
1598 const XMLCh Evidence::TYPE_NAME[] = UNICODE_LITERAL_12(E,v,i,d,e,n,c,e,T,y,p,e);
1599 const XMLCh Issuer::LOCAL_NAME[] = UNICODE_LITERAL_6(I,s,s,u,e,r);
1600 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);
1601 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);
1602 const XMLCh KeyInfoConfirmationDataType::NOTBEFORE_ATTRIB_NAME[] = UNICODE_LITERAL_9(N,o,t,B,e,f,o,r,e);
1603 const XMLCh KeyInfoConfirmationDataType::NOTONORAFTER_ATTRIB_NAME[] = UNICODE_LITERAL_12(N,o,t,O,n,O,r,A,f,t,e,r);
1604 const XMLCh KeyInfoConfirmationDataType::INRESPONSETO_ATTRIB_NAME[] = UNICODE_LITERAL_12(I,n,R,e,s,p,o,n,s,e,T,o);
1605 const XMLCh KeyInfoConfirmationDataType::RECIPIENT_ATTRIB_NAME[] = UNICODE_LITERAL_9(R,e,c,i,p,i,e,n,t);
1606 const XMLCh KeyInfoConfirmationDataType::ADDRESS_ATTRIB_NAME[] = UNICODE_LITERAL_7(A,d,d,r,e,s,s);
1607 const XMLCh NameID::LOCAL_NAME[] = UNICODE_LITERAL_6(N,a,m,e,I,D);
1608 const XMLCh NameIDType::LOCAL_NAME[] = {chNull};
1609 const XMLCh NameIDType::TYPE_NAME[] = UNICODE_LITERAL_10(N,a,m,e,I,D,T,y,p,e);
1610 const XMLCh NameIDType::NAMEQUALIFIER_ATTRIB_NAME[] = UNICODE_LITERAL_13(N,a,m,e,Q,u,a,l,i,f,i,e,r);
1611 const XMLCh NameIDType::SPNAMEQUALIFIER_ATTRIB_NAME[] = UNICODE_LITERAL_15(S,P,N,a,m,e,Q,u,a,l,i,f,i,e,r);
1612 const XMLCh NameIDType::FORMAT_ATTRIB_NAME[] = UNICODE_LITERAL_6(F,o,r,m,a,t);
1613 const XMLCh NameIDType::SPPROVIDEDID_ATTRIB_NAME[] = UNICODE_LITERAL_12(S,P,P,r,o,v,i,d,e,d,I,D);
1614 const XMLCh OneTimeUse::LOCAL_NAME[] = UNICODE_LITERAL_10(O,n,e,T,i,m,e,U,s,e);
1615 const XMLCh OneTimeUse::TYPE_NAME[] = UNICODE_LITERAL_14(O,n,e,T,i,m,e,U,s,e,T,y,p,e);
1616 const XMLCh ProxyRestriction::LOCAL_NAME[] = UNICODE_LITERAL_16(P,r,o,x,y,R,e,s,t,r,i,c,t,i,o,n);
1617 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);
1618 const XMLCh ProxyRestriction::COUNT_ATTRIB_NAME[] = UNICODE_LITERAL_5(C,o,u,n,t);
1619 const XMLCh Statement::LOCAL_NAME[] = UNICODE_LITERAL_9(S,t,a,t,e,m,e,n,t);
1620 const XMLCh Subject::LOCAL_NAME[] = UNICODE_LITERAL_7(S,u,b,j,e,c,t);
1621 const XMLCh Subject::TYPE_NAME[] = UNICODE_LITERAL_11(S,u,b,j,e,c,t,T,y,p,e);
1622 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);
1623 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);
1624 const XMLCh SubjectConfirmation::METHOD_ATTRIB_NAME[] = UNICODE_LITERAL_6(M,e,t,h,o,d);
1625 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);
1626 const XMLCh SubjectConfirmationData::NOTBEFORE_ATTRIB_NAME[] = UNICODE_LITERAL_9(N,o,t,B,e,f,o,r,e);
1627 const XMLCh SubjectConfirmationData::NOTONORAFTER_ATTRIB_NAME[] = UNICODE_LITERAL_12(N,o,t,O,n,O,r,A,f,t,e,r);
1628 const XMLCh SubjectConfirmationData::INRESPONSETO_ATTRIB_NAME[] = UNICODE_LITERAL_12(I,n,R,e,s,p,o,n,s,e,T,o);
1629 const XMLCh SubjectConfirmationData::RECIPIENT_ATTRIB_NAME[] = UNICODE_LITERAL_9(R,e,c,i,p,i,e,n,t);
1630 const XMLCh SubjectConfirmationData::ADDRESS_ATTRIB_NAME[] = UNICODE_LITERAL_7(A,d,d,r,e,s,s);
1631 const XMLCh SubjectLocality::LOCAL_NAME[] = UNICODE_LITERAL_15(S,u,b,j,e,c,t,L,o,c,a,l,i,t,y);
1632 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);
1633 const XMLCh SubjectLocality::ADDRESS_ATTRIB_NAME[] =UNICODE_LITERAL_7(A,d,d,r,e,s,s);
1634 const XMLCh SubjectLocality::DNSNAME_ATTRIB_NAME[] =UNICODE_LITERAL_7(D,N,S,N,a,m,e);
1636 const XMLCh NameIDType::UNSPECIFIED[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified
1637 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1638 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1639 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1640 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1641 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1642 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
1645 const XMLCh NameIDType::EMAIL[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress
1646 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1647 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1648 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1649 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1650 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1651 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
1654 const XMLCh NameIDType::X509_SUBJECT[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName
1655 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1656 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1657 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1658 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1659 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1660 chLatin_X, chDigit_5, chDigit_0, chDigit_9, chLatin_S, chLatin_u, chLatin_b, chLatin_j, chLatin_e, chLatin_c, chLatin_t,
1661 chLatin_N, chLatin_a, chLatin_m, chLatin_e, chNull
1664 const XMLCh NameIDType::WIN_DOMAIN_QUALIFIED[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName
1665 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1666 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1667 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1668 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1669 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1670 chLatin_W, chLatin_i, chLatin_n, chLatin_d, chLatin_o, chLatin_w, chLatin_s,
1671 chLatin_D, chLatin_o, chLatin_m, chLatin_a, chLatin_i, chLatin_n,
1672 chLatin_Q, chLatin_u, chLatin_a, chLatin_l, chLatin_i, chLatin_f, chLatin_i, chLatin_e, chLatin_d,
1673 chLatin_N, chLatin_a, chLatin_m, chLatin_e, chNull
1676 const XMLCh NameIDType::KERBEROS[] = // urn:oasis:names:tc:SAML:2.0:nameid-format:kerberos
1677 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1678 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1679 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1680 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1681 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1682 chLatin_k, chLatin_e, chLatin_r, chLatin_b, chLatin_e, chLatin_r, chLatin_o, chLatin_s, chNull
1685 const XMLCh NameIDType::ENTITY[] = // urn:oasis:names:tc:SAML:2.0:nameid-format:entity
1686 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1687 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1688 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1689 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1690 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1691 chLatin_e, chLatin_n, chLatin_t, chLatin_i, chLatin_t, chLatin_y, chNull
1694 const XMLCh NameIDType::PERSISTENT[] = // urn:oasis:names:tc:SAML:2.0:nameid-format:persistent
1695 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1696 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1697 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1698 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1699 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1700 chLatin_p, chLatin_e, chLatin_r, chLatin_s, chLatin_i, chLatin_s, chLatin_t, chLatin_e, chLatin_n, chLatin_t, chNull
1703 const XMLCh NameIDType::TRANSIENT[] = // urn:oasis:names:tc:SAML:2.0:nameid-format:transient
1704 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1705 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1706 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1707 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1708 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1709 chLatin_t, chLatin_r, chLatin_a, chLatin_n, chLatin_s, chLatin_i, chLatin_e, chLatin_n, chLatin_t, chNull
1712 const XMLCh SubjectConfirmation::BEARER[] = // urn:oasis:names:tc:SAML:2.0:cm:bearer
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_b, chLatin_e, chLatin_a, chLatin_r, chLatin_e, chLatin_r, chNull
1719 const XMLCh SubjectConfirmation::HOLDER_KEY[] = // urn:oasis:names:tc:SAML:2.0:cm:holder-of-key
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_h, chLatin_o, chLatin_l, chLatin_d, chLatin_e, chLatin_r, chDash,
1724 chLatin_o, chLatin_f, chDash, chLatin_k, chLatin_e, chLatin_y, chNull
1727 const XMLCh SubjectConfirmation::SENDER_VOUCHES[] = // urn:oasis:names:tc:SAML:2.0:cm:sender-vouches
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_2, chPeriod, chDigit_0, chColon,
1731 chLatin_c, chLatin_m, chColon, chLatin_s, chLatin_e, chLatin_n, chLatin_d, chLatin_e, chLatin_r, chDash,
1732 chLatin_v, chLatin_o, chLatin_u, chLatin_c, chLatin_h, chLatin_e, chLatin_s, chNull
1735 const XMLCh Action::RWEDC_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:rwedc
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, chNull
1743 const XMLCh Action::RWEDC_NEG_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:rwedc-negation
1744 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1745 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1746 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1747 chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1748 chLatin_r, chLatin_w, chLatin_e, chLatin_d, chLatin_c, chDash,
1749 chLatin_n, chLatin_e, chLatin_g, chLatin_a, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chNull
1752 const XMLCh Action::GHPP_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:ghpp
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_g, chLatin_h, chLatin_p, chLatin_p, chNull
1760 const XMLCh Action::UNIX_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:unix
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_1, chPeriod, chDigit_0, chColon,
1764 chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1765 chLatin_u, chLatin_n, chLatin_i, chLatin_x, chNull
1768 const XMLCh Attribute::UNSPECIFIED[] = // urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified
1769 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1770 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1771 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1772 chLatin_a, chLatin_t, chLatin_t, chLatin_r, chLatin_n, chLatin_a, chLatin_m, chLatin_e, chDash,
1773 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1774 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
1777 const XMLCh Attribute::URI_REFERENCE[] = // urn:oasis:names:tc:SAML:2.0:attrname-format:uri
1778 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1779 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1780 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1781 chLatin_a, chLatin_t, chLatin_t, chLatin_r, chLatin_n, chLatin_a, chLatin_m, chLatin_e, chDash,
1782 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1783 chLatin_u, chLatin_r, chLatin_i, chNull
1786 const XMLCh Attribute::BASIC[] = // urn:oasis:names:tc:SAML:2.0:attrname-format:basic
1787 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1788 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1789 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1790 chLatin_a, chLatin_t, chLatin_t, chLatin_r, chLatin_n, chLatin_a, chLatin_m, chLatin_e, chDash,
1791 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1792 chLatin_b, chLatin_a, chLatin_s, chLatin_i, chLatin_c, chNull