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(const CredentialResolver& credResolver, const XMLCh* recipient, CredentialCriteria* criteria) const
197 if (!m_EncryptedData)
198 throw DecryptionException("No encrypted data present.");
199 EncryptedKeyResolver ekr(*this);
200 Decrypter decrypter(&credResolver, criteria, &ekr);
201 DOMDocumentFragment* frag = decrypter.decryptData(*m_EncryptedData, recipient);
202 if (frag->hasChildNodes() && frag->getFirstChild()==frag->getLastChild()) {
203 DOMNode* plaintext=frag->getFirstChild();
204 if (plaintext->getNodeType()==DOMNode::ELEMENT_NODE) {
205 auto_ptr<XMLObject> ret(XMLObjectBuilder::buildOneFromElement(static_cast<DOMElement*>(plaintext)));
206 ret->releaseThisAndChildrenDOM();
207 return ret.release();
211 throw DecryptionException("Decryption did not result in a single element.");
214 IMPL_XMLOBJECT_CLONE(EncryptedElementType);
215 IMPL_TYPED_FOREIGN_CHILD(EncryptedData,xmlencryption);
216 IMPL_TYPED_FOREIGN_CHILDREN(EncryptedKey,xmlencryption,m_children.end());
219 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
220 PROC_TYPED_FOREIGN_CHILD(EncryptedData,xmlencryption,XMLENC_NS,false);
221 PROC_TYPED_FOREIGN_CHILDREN(EncryptedKey,xmlencryption,XMLENC_NS,false);
222 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
226 //TODO unit test for this
227 class SAML_DLLLOCAL EncryptedIDImpl : public virtual EncryptedID, public EncryptedElementTypeImpl
230 virtual ~EncryptedIDImpl() {}
232 EncryptedIDImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
233 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
235 EncryptedIDImpl(const EncryptedIDImpl& src) : AbstractXMLObject(src), EncryptedElementTypeImpl(src) {}
237 IMPL_XMLOBJECT_CLONE(EncryptedID);
238 EncryptedElementType* cloneEncryptedElementType() const {
239 return new EncryptedIDImpl(*this);
243 class SAML_DLLLOCAL AudienceRestrictionImpl : public virtual AudienceRestriction,
244 public AbstractComplexElement,
245 public AbstractDOMCachingXMLObject,
246 public AbstractXMLObjectMarshaller,
247 public AbstractXMLObjectUnmarshaller
250 virtual ~AudienceRestrictionImpl() {}
252 AudienceRestrictionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
253 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
256 AudienceRestrictionImpl(const AudienceRestrictionImpl& src)
257 : AbstractXMLObject(src), AbstractComplexElement(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,SAML20_NS,false);
275 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
279 class SAML_DLLLOCAL OneTimeUseImpl : public virtual OneTimeUse,
280 public AbstractSimpleElement,
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)
293 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
296 IMPL_XMLOBJECT_CLONE(OneTimeUse);
297 Condition* cloneCondition() const {
298 return cloneOneTimeUse();
302 class SAML_DLLLOCAL ProxyRestrictionImpl : public virtual ProxyRestriction,
303 public AbstractComplexElement,
304 public AbstractDOMCachingXMLObject,
305 public AbstractXMLObjectMarshaller,
306 public AbstractXMLObjectUnmarshaller
309 virtual ~ProxyRestrictionImpl() {
310 XMLString::release(&m_Count);
313 ProxyRestrictionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
314 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
318 ProxyRestrictionImpl(const ProxyRestrictionImpl& src)
319 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
320 setCount(src.m_Count);
321 VectorOf(Audience) v=getAudiences();
322 for (vector<Audience*>::const_iterator i=src.m_Audiences.begin(); i!=src.m_Audiences.end(); i++) {
324 v.push_back((*i)->cloneAudience());
329 IMPL_XMLOBJECT_CLONE(ProxyRestriction);
330 Condition* cloneCondition() const {
331 return cloneProxyRestriction();
333 IMPL_TYPED_CHILDREN(Audience,m_children.end());
334 IMPL_INTEGER_ATTRIB(Count);
337 void marshallAttributes(DOMElement* domElement) const {
338 MARSHALL_INTEGER_ATTRIB(Count,COUNT,NULL);
341 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
342 PROC_TYPED_CHILDREN(Audience,SAML20_NS,false);
343 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
346 void processAttribute(const DOMAttr* attribute) {
347 PROC_INTEGER_ATTRIB(Count,COUNT,NULL);
348 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
353 class SAML_DLLLOCAL ConditionsImpl : public virtual Conditions,
354 public AbstractComplexElement,
355 public AbstractDOMCachingXMLObject,
356 public AbstractXMLObjectMarshaller,
357 public AbstractXMLObjectUnmarshaller
360 m_NotBefore=m_NotOnOrAfter=NULL;
363 virtual ~ConditionsImpl() {
365 delete m_NotOnOrAfter;
368 ConditionsImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
369 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
373 ConditionsImpl(const ConditionsImpl& src)
374 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
376 setNotBefore(src.getNotBefore());
377 setNotOnOrAfter(src.getNotOnOrAfter());
379 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
381 AudienceRestriction* arc=dynamic_cast<AudienceRestriction*>(*i);
383 getAudienceRestrictions().push_back(arc->cloneAudienceRestriction());
387 OneTimeUse* dncc=dynamic_cast<OneTimeUse*>(*i);
389 getOneTimeUses().push_back(dncc->cloneOneTimeUse());
393 ProxyRestriction* prc=dynamic_cast<ProxyRestriction*>(*i);
395 getProxyRestrictions().push_back(prc->cloneProxyRestriction());
399 Condition* c=dynamic_cast<Condition*>(*i);
401 getConditions().push_back(c->cloneCondition());
408 IMPL_XMLOBJECT_CLONE(Conditions);
409 IMPL_DATETIME_ATTRIB(NotBefore,0);
410 IMPL_DATETIME_ATTRIB(NotOnOrAfter,SAMLTIME_MAX);
411 IMPL_TYPED_CHILDREN(AudienceRestriction, m_children.end());
412 IMPL_TYPED_CHILDREN(OneTimeUse,m_children.end());
413 IMPL_TYPED_CHILDREN(ProxyRestriction, m_children.end());
414 IMPL_TYPED_CHILDREN(Condition,m_children.end());
417 void marshallAttributes(DOMElement* domElement) const {
418 MARSHALL_DATETIME_ATTRIB(NotBefore,NOTBEFORE,NULL);
419 MARSHALL_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,NULL);
422 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
423 PROC_TYPED_CHILDREN(AudienceRestriction,SAML20_NS,false);
424 PROC_TYPED_CHILDREN(OneTimeUse,SAML20_NS,false);
425 PROC_TYPED_CHILDREN(ProxyRestriction,SAML20_NS,false);
426 PROC_TYPED_CHILDREN(Condition,SAML20_NS,false);
427 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
430 void processAttribute(const DOMAttr* attribute) {
431 PROC_DATETIME_ATTRIB(NotBefore,NOTBEFORE,NULL);
432 PROC_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,NULL);
433 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
437 class SAML_DLLLOCAL SubjectConfirmationDataTypeImpl : public virtual SubjectConfirmationDataType,
438 public AbstractDOMCachingXMLObject,
439 public AbstractXMLObjectMarshaller,
440 public AbstractXMLObjectUnmarshaller
443 m_NotBefore=m_NotOnOrAfter=NULL;
444 m_Recipient=m_InResponseTo=m_Address=NULL;
448 SubjectConfirmationDataTypeImpl() {
453 virtual ~SubjectConfirmationDataTypeImpl() {
455 delete m_NotOnOrAfter;
456 XMLString::release(&m_Recipient);
457 XMLString::release(&m_InResponseTo);
458 XMLString::release(&m_Address);
461 SubjectConfirmationDataTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
462 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
466 SubjectConfirmationDataTypeImpl(const SubjectConfirmationDataTypeImpl& src) : AbstractDOMCachingXMLObject(src) {
468 setNotBefore(src.getNotBefore());
469 setNotOnOrAfter(src.getNotOnOrAfter());
470 setRecipient(src.getRecipient());
471 setInResponseTo(src.getInResponseTo());
472 setAddress(src.getAddress());
475 IMPL_DATETIME_ATTRIB(NotBefore,0);
476 IMPL_DATETIME_ATTRIB(NotOnOrAfter,SAMLTIME_MAX);
477 IMPL_STRING_ATTRIB(Recipient);
478 IMPL_STRING_ATTRIB(InResponseTo);
479 IMPL_STRING_ATTRIB(Address);
482 void marshallAttributes(DOMElement* domElement) const {
483 MARSHALL_DATETIME_ATTRIB(NotBefore,NOTBEFORE,NULL);
484 MARSHALL_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,NULL);
485 MARSHALL_STRING_ATTRIB(Recipient,RECIPIENT,NULL);
486 MARSHALL_STRING_ATTRIB(InResponseTo,INRESPONSETO,NULL);
487 MARSHALL_STRING_ATTRIB(Address,ADDRESS,NULL);
490 void processAttribute(const DOMAttr* attribute) {
491 PROC_DATETIME_ATTRIB(NotBefore,NOTBEFORE,NULL);
492 PROC_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,NULL);
493 PROC_STRING_ATTRIB(Recipient,RECIPIENT,NULL);
494 PROC_STRING_ATTRIB(InResponseTo,INRESPONSETO,NULL);
495 PROC_STRING_ATTRIB(Address,ADDRESS,NULL);
496 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
500 class SAML_DLLLOCAL SubjectConfirmationDataImpl : public SubjectConfirmationData,
501 public SubjectConfirmationDataTypeImpl, public AnyElementImpl
504 virtual ~SubjectConfirmationDataImpl() {}
506 SubjectConfirmationDataImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
507 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
510 SubjectConfirmationDataImpl(const SubjectConfirmationDataImpl& src)
511 : SubjectConfirmationDataTypeImpl(src), AnyElementImpl(src) {
514 IMPL_XMLOBJECT_CLONE(SubjectConfirmationData);
515 SubjectConfirmationDataType* cloneSubjectConfirmationDataType() const {
516 return new SubjectConfirmationDataImpl(*this);
519 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
520 if (!qualifiedName.hasNamespaceURI()) {
521 if (XMLString::equals(qualifiedName.getLocalPart(),NOTBEFORE_ATTRIB_NAME)) {
525 else if (XMLString::equals(qualifiedName.getLocalPart(),NOTONORAFTER_ATTRIB_NAME)) {
526 setNotOnOrAfter(value);
529 else if (XMLString::equals(qualifiedName.getLocalPart(),RECIPIENT_ATTRIB_NAME)) {
533 else if (XMLString::equals(qualifiedName.getLocalPart(),INRESPONSETO_ATTRIB_NAME)) {
534 setInResponseTo(value);
537 else if (XMLString::equals(qualifiedName.getLocalPart(),ADDRESS_ATTRIB_NAME)) {
542 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
546 void marshallAttributes(DOMElement* domElement) const {
547 SubjectConfirmationDataTypeImpl::marshallAttributes(domElement);
548 AnyElementImpl::marshallAttributes(domElement);
552 class SAML_DLLLOCAL KeyInfoConfirmationDataTypeImpl : public virtual KeyInfoConfirmationDataType,
553 public SubjectConfirmationDataTypeImpl,
554 public AbstractComplexElement,
555 public AbstractAttributeExtensibleXMLObject
558 virtual ~KeyInfoConfirmationDataTypeImpl() {}
560 KeyInfoConfirmationDataTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
561 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
564 KeyInfoConfirmationDataTypeImpl(const KeyInfoConfirmationDataTypeImpl& src)
565 : AbstractXMLObject(src), SubjectConfirmationDataTypeImpl(src), AbstractComplexElement(src),
566 AbstractAttributeExtensibleXMLObject(src) {
567 VectorOf(KeyInfo) v=getKeyInfos();
568 for (vector<KeyInfo*>::const_iterator i=src.m_KeyInfos.begin(); i!=src.m_KeyInfos.end(); ++i)
569 v.push_back((*i)->cloneKeyInfo());
572 IMPL_XMLOBJECT_CLONE(KeyInfoConfirmationDataType);
573 SubjectConfirmationDataType* cloneSubjectConfirmationDataType() const {
574 return new KeyInfoConfirmationDataTypeImpl(*this);
577 IMPL_TYPED_CHILDREN(KeyInfo,m_children.end());
580 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
581 if (!qualifiedName.hasNamespaceURI()) {
582 if (XMLString::equals(qualifiedName.getLocalPart(),NOTBEFORE_ATTRIB_NAME)) {
586 else if (XMLString::equals(qualifiedName.getLocalPart(),NOTONORAFTER_ATTRIB_NAME)) {
587 setNotOnOrAfter(value);
590 else if (XMLString::equals(qualifiedName.getLocalPart(),RECIPIENT_ATTRIB_NAME)) {
594 else if (XMLString::equals(qualifiedName.getLocalPart(),INRESPONSETO_ATTRIB_NAME)) {
595 setInResponseTo(value);
598 else if (XMLString::equals(qualifiedName.getLocalPart(),ADDRESS_ATTRIB_NAME)) {
603 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
607 void marshallAttributes(DOMElement* domElement) const {
608 SubjectConfirmationDataTypeImpl::marshallAttributes(domElement);
609 marshallExtensionAttributes(domElement);
612 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
613 PROC_TYPED_CHILDREN(KeyInfo,XMLSIG_NS,false);
614 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
617 void processAttribute(const DOMAttr* attribute) {
618 unmarshallExtensionAttribute(attribute);
622 class SAML_DLLLOCAL SubjectConfirmationImpl : public virtual SubjectConfirmation,
623 public AbstractComplexElement,
624 public AbstractDOMCachingXMLObject,
625 public AbstractXMLObjectMarshaller,
626 public AbstractXMLObjectUnmarshaller
633 m_SubjectConfirmationData=NULL;
634 m_children.push_back(NULL);
635 m_children.push_back(NULL);
636 m_children.push_back(NULL);
637 m_children.push_back(NULL);
638 m_pos_BaseID=m_children.begin();
639 m_pos_NameID=m_pos_BaseID;
641 m_pos_EncryptedID=m_pos_NameID;
643 m_pos_SubjectConfirmationData=m_pos_EncryptedID;
644 ++m_pos_SubjectConfirmationData;
647 virtual ~SubjectConfirmationImpl() {}
649 SubjectConfirmationImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
650 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
654 SubjectConfirmationImpl(const SubjectConfirmationImpl& src)
655 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
657 setMethod(src.getMethod());
659 setBaseID(src.getBaseID()->cloneBaseID());
661 setNameID(src.getNameID()->cloneNameID());
662 if (src.getEncryptedID())
663 setEncryptedID(src.getEncryptedID()->cloneEncryptedID());
664 if (src.getSubjectConfirmationData())
665 setSubjectConfirmationData(src.getSubjectConfirmationData()->clone());
668 IMPL_XMLOBJECT_CLONE(SubjectConfirmation);
669 IMPL_STRING_ATTRIB(Method);
670 IMPL_TYPED_CHILD(BaseID);
671 IMPL_TYPED_CHILD(NameID);
672 IMPL_TYPED_CHILD(EncryptedID);
673 IMPL_XMLOBJECT_CHILD(SubjectConfirmationData);
676 void marshallAttributes(DOMElement* domElement) const {
677 MARSHALL_STRING_ATTRIB(Method,METHOD,NULL);
680 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
681 PROC_TYPED_CHILD(BaseID,SAML20_NS,false);
682 PROC_TYPED_CHILD(NameID,SAML20_NS,false);
683 PROC_TYPED_CHILD(EncryptedID,SAML20_NS,false);
684 PROC_XMLOBJECT_CHILD(SubjectConfirmationData,SAML20_NS);
685 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
688 void processAttribute(const DOMAttr* attribute) {
689 PROC_STRING_ATTRIB(Method,METHOD,NULL);
690 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
694 class SAML_DLLLOCAL SubjectImpl : public virtual Subject,
695 public AbstractComplexElement,
696 public AbstractDOMCachingXMLObject,
697 public AbstractXMLObjectMarshaller,
698 public AbstractXMLObjectUnmarshaller
704 m_children.push_back(NULL);
705 m_children.push_back(NULL);
706 m_children.push_back(NULL);
707 m_pos_BaseID=m_children.begin();
708 m_pos_NameID=m_pos_BaseID;
710 m_pos_EncryptedID=m_pos_NameID;
714 virtual ~SubjectImpl() {}
716 SubjectImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
717 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
721 SubjectImpl(const SubjectImpl& src)
722 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
725 setBaseID(src.getBaseID()->cloneBaseID());
727 setNameID(src.getNameID()->cloneNameID());
728 if (src.getEncryptedID())
729 setEncryptedID(src.getEncryptedID()->cloneEncryptedID());
730 VectorOf(SubjectConfirmation) v=getSubjectConfirmations();
731 for (vector<SubjectConfirmation*>::const_iterator i=src.m_SubjectConfirmations.begin(); i!=src.m_SubjectConfirmations.end(); i++) {
733 v.push_back((*i)->cloneSubjectConfirmation());
738 IMPL_XMLOBJECT_CLONE(Subject);
739 IMPL_TYPED_CHILD(NameID);
740 IMPL_TYPED_CHILD(BaseID);
741 IMPL_TYPED_CHILD(EncryptedID);
742 IMPL_TYPED_CHILDREN(SubjectConfirmation,m_children.end());
745 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
746 PROC_TYPED_CHILD(BaseID,SAML20_NS,false);
747 PROC_TYPED_CHILD(NameID,SAML20_NS,false);
748 PROC_TYPED_CHILD(EncryptedID,SAML20_NS,false);
749 PROC_TYPED_CHILDREN(SubjectConfirmation,SAML20_NS,false);
750 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
754 class SAML_DLLLOCAL SubjectLocalityImpl : public virtual SubjectLocality,
755 public AbstractSimpleElement,
756 public AbstractDOMCachingXMLObject,
757 public AbstractXMLObjectMarshaller,
758 public AbstractXMLObjectUnmarshaller
761 m_Address=m_DNSName=NULL;
764 virtual ~SubjectLocalityImpl() {
765 XMLString::release(&m_Address);
766 XMLString::release(&m_DNSName);
769 SubjectLocalityImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
770 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
774 SubjectLocalityImpl(const SubjectLocalityImpl& src)
775 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
777 setAddress(src.getAddress());
778 setDNSName(src.getDNSName());
781 IMPL_XMLOBJECT_CLONE(SubjectLocality);
782 IMPL_STRING_ATTRIB(Address);
783 IMPL_STRING_ATTRIB(DNSName);
786 void marshallAttributes(DOMElement* domElement) const {
787 MARSHALL_STRING_ATTRIB(Address,ADDRESS,NULL);
788 MARSHALL_STRING_ATTRIB(DNSName,DNSNAME,NULL);
791 void processAttribute(const DOMAttr* attribute) {
792 PROC_STRING_ATTRIB(Address,ADDRESS,NULL);
793 PROC_STRING_ATTRIB(DNSName,DNSNAME,NULL);
794 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
798 //TODO need unit test for this
799 class SAML_DLLLOCAL AuthnContextDeclImpl : public virtual AuthnContextDecl, public AnyElementImpl
802 virtual ~AuthnContextDeclImpl() {}
804 AuthnContextDeclImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
805 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
808 AuthnContextDeclImpl(const AuthnContextDeclImpl& src) : AnyElementImpl(src) {
811 IMPL_XMLOBJECT_CLONE(AuthnContextDecl);
814 class SAML_DLLLOCAL AuthnContextImpl : public virtual AuthnContext,
815 public AbstractComplexElement,
816 public AbstractDOMCachingXMLObject,
817 public AbstractXMLObjectMarshaller,
818 public AbstractXMLObjectUnmarshaller
821 m_AuthnContextClassRef=NULL;
822 m_AuthnContextDecl=NULL;
823 m_AuthnContextDeclRef=NULL;
824 m_children.push_back(NULL);
825 m_children.push_back(NULL);
826 m_children.push_back(NULL);
827 m_pos_AuthnContextClassRef=m_children.begin();
828 m_pos_AuthnContextDecl=m_pos_AuthnContextClassRef;
829 ++m_pos_AuthnContextDecl;
830 m_pos_AuthnContextDeclRef=m_pos_AuthnContextDecl;
831 ++m_pos_AuthnContextDeclRef;
834 virtual ~AuthnContextImpl() {}
836 AuthnContextImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
837 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
841 AuthnContextImpl(const AuthnContextImpl& src)
842 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
844 if (src.getAuthnContextClassRef())
845 setAuthnContextClassRef(src.getAuthnContextClassRef()->cloneAuthnContextClassRef());
846 if (src.getAuthnContextDecl())
847 setAuthnContextDecl(src.getAuthnContextDecl()->clone());
848 if (src.getAuthnContextDeclRef())
849 setAuthnContextDeclRef(src.getAuthnContextDeclRef()->cloneAuthnContextDeclRef());
850 VectorOf(AuthenticatingAuthority) v=getAuthenticatingAuthoritys();
851 for (vector<AuthenticatingAuthority*>::const_iterator i=src.m_AuthenticatingAuthoritys.begin(); i!=src.m_AuthenticatingAuthoritys.end(); i++) {
853 v.push_back((*i)->cloneAuthenticatingAuthority());
858 IMPL_XMLOBJECT_CLONE(AuthnContext);
859 IMPL_TYPED_CHILD(AuthnContextClassRef);
860 IMPL_XMLOBJECT_CHILD(AuthnContextDecl);
861 IMPL_TYPED_CHILD(AuthnContextDeclRef);
862 IMPL_TYPED_CHILDREN(AuthenticatingAuthority,m_children.end());
865 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
866 PROC_TYPED_CHILD(AuthnContextClassRef,SAML20_NS,false);
867 PROC_XMLOBJECT_CHILD(AuthnContextDecl,SAML20_NS);
868 PROC_TYPED_CHILD(AuthnContextDeclRef,SAML20_NS,false);
869 PROC_TYPED_CHILDREN(AuthenticatingAuthority,SAML20_NS,false);
870 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
874 class SAML_DLLLOCAL AuthnStatementImpl : public virtual AuthnStatement,
875 public AbstractComplexElement,
876 public AbstractDOMCachingXMLObject,
877 public AbstractXMLObjectMarshaller,
878 public AbstractXMLObjectUnmarshaller
883 m_SessionNotOnOrAfter=NULL;
884 m_SubjectLocality=NULL;
886 m_children.push_back(NULL);
887 m_children.push_back(NULL);
888 m_pos_SubjectLocality=m_children.begin();
889 m_pos_AuthnContext=m_pos_SubjectLocality;
890 ++m_pos_AuthnContext;
893 virtual ~AuthnStatementImpl() {
894 delete m_AuthnInstant;
895 XMLString::release(&m_SessionIndex);
896 delete m_SessionNotOnOrAfter;
899 AuthnStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
900 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
904 AuthnStatementImpl(const AuthnStatementImpl& src)
905 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
907 setAuthnInstant(src.getAuthnInstant());
908 setSessionIndex(src.getSessionIndex());
909 setSessionNotOnOrAfter(src.getSessionNotOnOrAfter());
910 if (src.getSubjectLocality())
911 setSubjectLocality(src.getSubjectLocality()->cloneSubjectLocality());
912 if (src.getAuthnContext())
913 setAuthnContext(src.getAuthnContext()->cloneAuthnContext());
916 IMPL_XMLOBJECT_CLONE(AuthnStatement);
917 Statement* cloneStatement() const {
918 return cloneAuthnStatement();
920 IMPL_DATETIME_ATTRIB(AuthnInstant,0);
921 IMPL_STRING_ATTRIB(SessionIndex);
922 IMPL_DATETIME_ATTRIB(SessionNotOnOrAfter,SAMLTIME_MAX);
923 IMPL_TYPED_CHILD(SubjectLocality);
924 IMPL_TYPED_CHILD(AuthnContext);
927 void marshallAttributes(DOMElement* domElement) const {
928 MARSHALL_DATETIME_ATTRIB(AuthnInstant,AUTHNINSTANT,NULL);
929 MARSHALL_STRING_ATTRIB(SessionIndex,SESSIONINDEX,NULL);
930 MARSHALL_DATETIME_ATTRIB(SessionNotOnOrAfter,SESSIONNOTONORAFTER,NULL);
933 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
934 PROC_TYPED_CHILD(SubjectLocality,SAML20_NS,false);
935 PROC_TYPED_CHILD(AuthnContext,SAML20_NS,false);
936 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
939 void processAttribute(const DOMAttr* attribute) {
940 PROC_DATETIME_ATTRIB(AuthnInstant,AUTHNINSTANT,NULL);
941 PROC_STRING_ATTRIB(SessionIndex,SESSIONINDEX,NULL);
942 PROC_DATETIME_ATTRIB(SessionNotOnOrAfter,SESSIONNOTONORAFTER,NULL);
943 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
947 class SAML_DLLLOCAL ActionImpl : public virtual Action,
948 public AbstractSimpleElement,
949 public AbstractDOMCachingXMLObject,
950 public AbstractXMLObjectMarshaller,
951 public AbstractXMLObjectUnmarshaller
954 virtual ~ActionImpl() {
955 XMLString::release(&m_Namespace);
958 ActionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
959 : AbstractXMLObject(nsURI, localName, prefix, schemaType), m_Namespace(NULL) {
962 ActionImpl(const ActionImpl& src)
963 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
964 setNamespace(src.getNamespace());
967 IMPL_XMLOBJECT_CLONE(Action);
968 IMPL_STRING_ATTRIB(Namespace);
971 void marshallAttributes(DOMElement* domElement) const {
972 MARSHALL_STRING_ATTRIB(Namespace,NAMESPACE,NULL);
975 void processAttribute(const DOMAttr* attribute) {
976 PROC_STRING_ATTRIB(Namespace,NAMESPACE,NULL);
977 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
981 class SAML_DLLLOCAL EvidenceImpl : public virtual Evidence,
982 public AbstractComplexElement,
983 public AbstractDOMCachingXMLObject,
984 public AbstractXMLObjectMarshaller,
985 public AbstractXMLObjectUnmarshaller
988 virtual ~EvidenceImpl() {}
990 EvidenceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
991 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
994 EvidenceImpl(const EvidenceImpl& src)
995 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
996 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
998 AssertionIDRef* ref=dynamic_cast<AssertionIDRef*>(*i);
1000 getAssertionIDRefs().push_back(ref->cloneAssertionIDRef());
1004 AssertionURIRef* uri=dynamic_cast<AssertionURIRef*>(*i);
1006 getAssertionURIRefs().push_back(uri->cloneAssertionURIRef());
1010 Assertion* assertion=dynamic_cast<Assertion*>(*i);
1012 getAssertions().push_back(assertion->cloneAssertion());
1016 EncryptedAssertion* enc=dynamic_cast<EncryptedAssertion*>(*i);
1018 getEncryptedAssertions().push_back(enc->cloneEncryptedAssertion());
1025 IMPL_XMLOBJECT_CLONE(Evidence);
1026 IMPL_TYPED_CHILDREN(AssertionIDRef,m_children.end());
1027 IMPL_TYPED_CHILDREN(AssertionURIRef,m_children.end());
1028 IMPL_TYPED_CHILDREN(Assertion,m_children.end());
1029 IMPL_TYPED_CHILDREN(EncryptedAssertion,m_children.end());
1032 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1033 PROC_TYPED_CHILDREN(AssertionIDRef,SAML20_NS,false);
1034 PROC_TYPED_CHILDREN(AssertionURIRef,SAML20_NS,false);
1035 PROC_TYPED_CHILDREN(Assertion,SAML20_NS,false);
1036 PROC_TYPED_CHILDREN(EncryptedAssertion,SAML20_NS,false);
1037 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1041 class SAML_DLLLOCAL AuthzDecisionStatementImpl : public virtual AuthzDecisionStatement,
1042 public AbstractComplexElement,
1043 public AbstractDOMCachingXMLObject,
1044 public AbstractXMLObjectMarshaller,
1045 public AbstractXMLObjectUnmarshaller
1051 m_children.push_back(NULL);
1052 m_pos_Evidence=m_children.begin();
1055 virtual ~AuthzDecisionStatementImpl() {
1056 XMLString::release(&m_Resource);
1057 XMLString::release(&m_Decision);
1060 AuthzDecisionStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1061 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1065 AuthzDecisionStatementImpl(const AuthzDecisionStatementImpl& src)
1066 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
1068 setResource(src.getResource());
1069 setDecision(src.getDecision());
1070 if (src.getEvidence())
1071 setEvidence(src.getEvidence()->cloneEvidence());
1072 VectorOf(Action) v=getActions();
1073 for (vector<Action*>::const_iterator i=src.m_Actions.begin(); i!=src.m_Actions.end(); i++) {
1075 v.push_back((*i)->cloneAction());
1080 IMPL_XMLOBJECT_CLONE(AuthzDecisionStatement);
1081 Statement* cloneStatement() const {
1082 return cloneAuthzDecisionStatement();
1084 IMPL_STRING_ATTRIB(Resource);
1085 IMPL_STRING_ATTRIB(Decision);
1086 IMPL_TYPED_CHILD(Evidence);
1087 IMPL_TYPED_CHILDREN(Action, m_pos_Evidence);
1090 void marshallAttributes(DOMElement* domElement) const {
1091 MARSHALL_STRING_ATTRIB(Resource,RESOURCE,NULL);
1092 MARSHALL_STRING_ATTRIB(Decision,DECISION,NULL);
1095 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1096 PROC_TYPED_CHILD(Evidence,SAML20_NS,false);
1097 PROC_TYPED_CHILDREN(Action,SAML20_NS,false);
1098 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1101 void processAttribute(const DOMAttr* attribute) {
1102 PROC_STRING_ATTRIB(Resource,RESOURCE,NULL);
1103 PROC_STRING_ATTRIB(Decision,DECISION,NULL);
1104 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
1108 //TODO need unit test for this
1109 class SAML_DLLLOCAL AttributeValueImpl : public virtual AttributeValue, public AnyElementImpl
1112 virtual ~AttributeValueImpl() {}
1114 AttributeValueImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1115 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1118 AttributeValueImpl(const AttributeValueImpl& src) : AnyElementImpl(src) {
1121 IMPL_XMLOBJECT_CLONE(AttributeValue);
1125 class SAML_DLLLOCAL AttributeImpl : public virtual Attribute,
1126 public AbstractComplexElement,
1127 public AbstractAttributeExtensibleXMLObject,
1128 public AbstractDOMCachingXMLObject,
1129 public AbstractXMLObjectMarshaller,
1130 public AbstractXMLObjectUnmarshaller
1133 m_Name=m_NameFormat=m_FriendlyName=NULL;
1136 virtual ~AttributeImpl() {
1137 XMLString::release(&m_Name);
1138 XMLString::release(&m_NameFormat);
1139 XMLString::release(&m_FriendlyName);
1142 AttributeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1143 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1147 AttributeImpl(const AttributeImpl& src)
1148 : AbstractXMLObject(src), AbstractComplexElement(src),
1149 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
1151 setName(src.getName());
1152 setNameFormat(src.getNameFormat());
1153 setFriendlyName(src.getFriendlyName());
1154 VectorOf(XMLObject) v=getAttributeValues();
1155 for (vector<XMLObject*>::const_iterator i=src.m_AttributeValues.begin(); i!=src.m_AttributeValues.end(); i++) {
1157 v.push_back((*i)->clone());
1162 IMPL_XMLOBJECT_CLONE(Attribute);
1163 IMPL_STRING_ATTRIB(Name);
1164 IMPL_STRING_ATTRIB(NameFormat);
1165 IMPL_STRING_ATTRIB(FriendlyName);
1166 IMPL_XMLOBJECT_CHILDREN(AttributeValue,m_children.end());
1168 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
1169 if (!qualifiedName.hasNamespaceURI()) {
1170 if (XMLString::equals(qualifiedName.getLocalPart(),NAME_ATTRIB_NAME)) {
1174 else if (XMLString::equals(qualifiedName.getLocalPart(),NAMEFORMAT_ATTRIB_NAME)) {
1175 setNameFormat(value);
1178 else if (XMLString::equals(qualifiedName.getLocalPart(),FRIENDLYNAME_ATTRIB_NAME)) {
1179 setFriendlyName(value);
1183 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
1187 void marshallAttributes(DOMElement* domElement) const {
1188 MARSHALL_STRING_ATTRIB(Name,NAME,NULL);
1189 MARSHALL_STRING_ATTRIB(NameFormat,NAMEFORMAT,NULL);
1190 MARSHALL_STRING_ATTRIB(FriendlyName,FRIENDLYNAME,NULL);
1191 marshallExtensionAttributes(domElement);
1194 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1195 getAttributeValues().push_back(childXMLObject);
1198 void processAttribute(const DOMAttr* attribute) {
1199 unmarshallExtensionAttribute(attribute);
1203 //TODO unit test for this
1204 class SAML_DLLLOCAL EncryptedAttributeImpl : public virtual EncryptedAttribute, public EncryptedElementTypeImpl
1207 virtual ~EncryptedAttributeImpl() {}
1209 EncryptedAttributeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1210 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1212 EncryptedAttributeImpl(const EncryptedAttributeImpl& src) : AbstractXMLObject(src), EncryptedElementTypeImpl(src) {}
1214 IMPL_XMLOBJECT_CLONE(EncryptedAttribute);
1215 EncryptedElementType* cloneEncryptedElementType() const {
1216 return new EncryptedAttributeImpl(*this);
1220 class SAML_DLLLOCAL AttributeStatementImpl : public virtual AttributeStatement,
1221 public AbstractComplexElement,
1222 public AbstractDOMCachingXMLObject,
1223 public AbstractXMLObjectMarshaller,
1224 public AbstractXMLObjectUnmarshaller
1227 virtual ~AttributeStatementImpl() {}
1229 AttributeStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1230 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1233 AttributeStatementImpl(const AttributeStatementImpl& src)
1234 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
1235 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
1237 Attribute* attribute=dynamic_cast<Attribute*>(*i);
1239 getAttributes().push_back(attribute->cloneAttribute());
1243 EncryptedAttribute* enc=dynamic_cast<EncryptedAttribute*>(*i);
1245 getEncryptedAttributes().push_back(enc->cloneEncryptedAttribute());
1252 IMPL_XMLOBJECT_CLONE(AttributeStatement);
1253 Statement* cloneStatement() const {
1254 return cloneAttributeStatement();
1256 IMPL_TYPED_CHILDREN(Attribute, m_children.end());
1257 IMPL_TYPED_CHILDREN(EncryptedAttribute, m_children.end());
1260 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1261 PROC_TYPED_CHILDREN(Attribute,SAML20_NS,false);
1262 PROC_TYPED_CHILDREN(EncryptedAttribute,SAML20_NS,false);
1263 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1267 class SAML_DLLLOCAL AdviceImpl : public virtual Advice,
1268 public AbstractComplexElement,
1269 public AbstractDOMCachingXMLObject,
1270 public AbstractXMLObjectMarshaller,
1271 public AbstractXMLObjectUnmarshaller
1274 virtual ~AdviceImpl() {}
1276 AdviceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1277 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1280 AdviceImpl(const AdviceImpl& src)
1281 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
1282 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
1284 AssertionIDRef* ref=dynamic_cast<AssertionIDRef*>(*i);
1286 getAssertionIDRefs().push_back(ref->cloneAssertionIDRef());
1290 AssertionURIRef* uri=dynamic_cast<AssertionURIRef*>(*i);
1292 getAssertionURIRefs().push_back(uri->cloneAssertionURIRef());
1296 Assertion* assertion=dynamic_cast<Assertion*>(*i);
1298 getAssertions().push_back(assertion->cloneAssertion());
1302 EncryptedAssertion* enc=dynamic_cast<EncryptedAssertion*>(*i);
1304 getEncryptedAssertions().push_back(enc->cloneEncryptedAssertion());
1308 getUnknownXMLObjects().push_back((*i)->clone());
1313 IMPL_XMLOBJECT_CLONE(Advice);
1314 IMPL_TYPED_CHILDREN(AssertionIDRef,m_children.end());
1315 IMPL_TYPED_CHILDREN(AssertionURIRef,m_children.end());
1316 IMPL_TYPED_CHILDREN(Assertion,m_children.end());
1317 IMPL_TYPED_CHILDREN(EncryptedAssertion,m_children.end());
1318 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
1321 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1322 PROC_TYPED_CHILDREN(AssertionIDRef,SAML20_NS,false);
1323 PROC_TYPED_CHILDREN(AssertionURIRef,SAML20_NS,false);
1324 PROC_TYPED_CHILDREN(Assertion,SAML20_NS,false);
1325 PROC_TYPED_CHILDREN(EncryptedAssertion,SAML20_NS,false);
1328 const XMLCh* nsURI=root->getNamespaceURI();
1329 if (!XMLString::equals(nsURI,SAML20_NS) && nsURI && *nsURI) {
1330 getUnknownXMLObjects().push_back(childXMLObject);
1334 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1338 //TODO unit test for this
1339 class SAML_DLLLOCAL EncryptedAssertionImpl : public virtual EncryptedAssertion, public EncryptedElementTypeImpl
1342 virtual ~EncryptedAssertionImpl() {}
1344 EncryptedAssertionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1345 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1347 EncryptedAssertionImpl(const EncryptedAssertionImpl& src) : AbstractXMLObject(src), EncryptedElementTypeImpl(src) {}
1349 IMPL_XMLOBJECT_CLONE(EncryptedAssertion);
1350 EncryptedElementType* cloneEncryptedElementType() const {
1351 return new EncryptedAssertionImpl(*this);
1355 class SAML_DLLLOCAL AssertionImpl : public virtual Assertion,
1356 public AbstractComplexElement,
1357 public AbstractDOMCachingXMLObject,
1358 public AbstractXMLObjectMarshaller,
1359 public AbstractXMLObjectUnmarshaller
1364 m_IssueInstant=NULL;
1370 m_children.push_back(NULL);
1371 m_children.push_back(NULL);
1372 m_children.push_back(NULL);
1373 m_children.push_back(NULL);
1374 m_children.push_back(NULL);
1375 m_pos_Issuer=m_children.begin();
1376 m_pos_Signature=m_pos_Issuer;
1378 m_pos_Subject=m_pos_Signature;
1380 m_pos_Conditions=m_pos_Subject;
1382 m_pos_Advice=m_pos_Conditions;
1386 virtual ~AssertionImpl() {
1387 XMLString::release(&m_ID);
1388 XMLString::release(&m_Version);
1389 delete m_IssueInstant;
1392 AssertionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1393 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1397 AssertionImpl(const AssertionImpl& src)
1398 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
1400 setVersion(src.getVersion());
1402 setIssueInstant(src.getIssueInstant());
1403 if (src.getIssuer())
1404 setIssuer(src.getIssuer()->cloneIssuer());
1405 if (src.getSignature())
1406 setSignature(src.getSignature()->cloneSignature());
1407 if (src.getSubject())
1408 setSubject(src.getSubject()->cloneSubject());
1409 if (src.getConditions())
1410 setConditions(src.getConditions()->cloneConditions());
1411 if (src.getAdvice())
1412 setAdvice(src.getAdvice()->cloneAdvice());
1413 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
1415 AuthnStatement* authst=dynamic_cast<AuthnStatement*>(*i);
1417 getAuthnStatements().push_back(authst->cloneAuthnStatement());
1421 AttributeStatement* attst=dynamic_cast<AttributeStatement*>(*i);
1423 getAttributeStatements().push_back(attst->cloneAttributeStatement());
1427 AuthzDecisionStatement* authzst=dynamic_cast<AuthzDecisionStatement*>(*i);
1429 getAuthzDecisionStatements().push_back(authzst->cloneAuthzDecisionStatement());
1433 Statement* st=dynamic_cast<Statement*>(*i);
1435 getStatements().push_back(st->cloneStatement());
1442 //IMPL_TYPED_CHILD(Signature);
1443 // Need customized setter.
1445 Signature* m_Signature;
1446 list<XMLObject*>::iterator m_pos_Signature;
1448 Signature* getSignature() const {
1452 void setSignature(Signature* sig) {
1453 prepareForAssignment(m_Signature,sig);
1454 *m_pos_Signature=m_Signature=sig;
1455 // Sync content reference back up.
1457 m_Signature->setContentReference(new opensaml::ContentReference(*this));
1460 IMPL_XMLOBJECT_CLONE(Assertion);
1461 IMPL_STRING_ATTRIB(Version);
1463 IMPL_DATETIME_ATTRIB(IssueInstant,0);
1464 IMPL_TYPED_CHILD(Issuer);
1465 IMPL_TYPED_CHILD(Subject);
1466 IMPL_TYPED_CHILD(Conditions);
1467 IMPL_TYPED_CHILD(Advice);
1468 IMPL_TYPED_CHILDREN(Statement, m_children.end());
1469 IMPL_TYPED_CHILDREN(AuthnStatement, m_children.end());
1470 IMPL_TYPED_CHILDREN(AttributeStatement, m_children.end());
1471 IMPL_TYPED_CHILDREN(AuthzDecisionStatement, m_children.end());
1474 void marshallAttributes(DOMElement* domElement) const {
1476 const_cast<AssertionImpl*>(this)->m_Version=XMLString::transcode("2.0");
1477 MARSHALL_STRING_ATTRIB(Version,VER,NULL);
1479 const_cast<AssertionImpl*>(this)->m_ID=SAMLConfig::getConfig().generateIdentifier();
1480 MARSHALL_ID_ATTRIB(ID,ID,NULL);
1481 if (!m_IssueInstant) {
1482 const_cast<AssertionImpl*>(this)->m_IssueInstantEpoch=time(NULL);
1483 const_cast<AssertionImpl*>(this)->m_IssueInstant=new DateTime(m_IssueInstantEpoch);
1485 MARSHALL_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,NULL);
1488 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1489 PROC_TYPED_CHILD(Issuer,SAML20_NS,false);
1490 PROC_TYPED_CHILD(Signature,XMLSIG_NS,false);
1491 PROC_TYPED_CHILD(Subject,SAML20_NS,false);
1492 PROC_TYPED_CHILD(Conditions,SAML20_NS,false);
1493 PROC_TYPED_CHILD(Advice,SAML20_NS,false);
1494 PROC_TYPED_CHILDREN(AuthnStatement,SAML20_NS,false);
1495 PROC_TYPED_CHILDREN(AttributeStatement,SAML20_NS,false);
1496 PROC_TYPED_CHILDREN(AuthzDecisionStatement,SAML20_NS,false);
1497 PROC_TYPED_CHILDREN(Statement,SAML20_NS,false);
1498 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1501 void processAttribute(const DOMAttr* attribute) {
1502 PROC_STRING_ATTRIB(Version,VER,NULL);
1503 PROC_ID_ATTRIB(ID,ID,NULL);
1504 PROC_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,NULL);
1505 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
1512 #if defined (_MSC_VER)
1513 #pragma warning( pop )
1516 // Builder Implementations
1518 IMPL_XMLOBJECTBUILDER(Action);
1519 IMPL_XMLOBJECTBUILDER(Advice);
1520 IMPL_XMLOBJECTBUILDER(Assertion);
1521 IMPL_XMLOBJECTBUILDER(AssertionIDRef);
1522 IMPL_XMLOBJECTBUILDER(AssertionURIRef);
1523 IMPL_XMLOBJECTBUILDER(Attribute);
1524 IMPL_XMLOBJECTBUILDER(AttributeStatement);
1525 IMPL_XMLOBJECTBUILDER(AttributeValue);
1526 IMPL_XMLOBJECTBUILDER(Audience);
1527 IMPL_XMLOBJECTBUILDER(AudienceRestriction);
1528 IMPL_XMLOBJECTBUILDER(AuthenticatingAuthority);
1529 IMPL_XMLOBJECTBUILDER(AuthnContext);
1530 IMPL_XMLOBJECTBUILDER(AuthnContextClassRef);
1531 IMPL_XMLOBJECTBUILDER(AuthnContextDecl);
1532 IMPL_XMLOBJECTBUILDER(AuthnContextDeclRef);
1533 IMPL_XMLOBJECTBUILDER(AuthnStatement);
1534 IMPL_XMLOBJECTBUILDER(AuthzDecisionStatement);
1535 IMPL_XMLOBJECTBUILDER(Conditions);
1536 IMPL_XMLOBJECTBUILDER(EncryptedAssertion);
1537 IMPL_XMLOBJECTBUILDER(EncryptedAttribute);
1538 IMPL_XMLOBJECTBUILDER(EncryptedID);
1539 IMPL_XMLOBJECTBUILDER(Evidence);
1540 IMPL_XMLOBJECTBUILDER(Issuer);
1541 IMPL_XMLOBJECTBUILDER(KeyInfoConfirmationDataType);
1542 IMPL_XMLOBJECTBUILDER(NameID);
1543 IMPL_XMLOBJECTBUILDER(NameIDType);
1544 IMPL_XMLOBJECTBUILDER(OneTimeUse);
1545 IMPL_XMLOBJECTBUILDER(ProxyRestriction);
1546 IMPL_XMLOBJECTBUILDER(Subject);
1547 IMPL_XMLOBJECTBUILDER(SubjectConfirmation);
1548 IMPL_XMLOBJECTBUILDER(SubjectConfirmationData);
1549 IMPL_XMLOBJECTBUILDER(SubjectLocality);
1552 const XMLCh Action::LOCAL_NAME[] = UNICODE_LITERAL_6(A,c,t,i,o,n);
1553 const XMLCh Action::TYPE_NAME[] = UNICODE_LITERAL_10(A,c,t,i,o,n,T,y,p,e);
1554 const XMLCh Action::NAMESPACE_ATTRIB_NAME[] = UNICODE_LITERAL_9(N,a,m,e,s,p,a,c,e);
1555 const XMLCh Advice::LOCAL_NAME[] = UNICODE_LITERAL_6(A,d,v,i,c,e);
1556 const XMLCh Advice::TYPE_NAME[] = UNICODE_LITERAL_10(A,d,v,i,c,e,T,y,p,e);
1557 const XMLCh Assertion::LOCAL_NAME[] = UNICODE_LITERAL_9(A,s,s,e,r,t,i,o,n);
1558 const XMLCh Assertion::TYPE_NAME[] = UNICODE_LITERAL_13(A,s,s,e,r,t,i,o,n,T,y,p,e);
1559 const XMLCh Assertion::VER_ATTRIB_NAME[] = UNICODE_LITERAL_7(V,e,r,s,i,o,n);
1560 const XMLCh Assertion::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
1561 const XMLCh Assertion::ISSUEINSTANT_ATTRIB_NAME[] = UNICODE_LITERAL_12(I,s,s,u,e,I,n,s,t,a,n,t);
1562 const XMLCh AssertionIDRef::LOCAL_NAME[] = UNICODE_LITERAL_14(A,s,s,e,r,t,i,o,n,I,D,R,e,f);
1563 const XMLCh AssertionURIRef::LOCAL_NAME[] = UNICODE_LITERAL_15(A,s,s,e,r,t,i,o,n,U,R,I,R,e,f);
1564 const XMLCh Attribute::LOCAL_NAME[] = UNICODE_LITERAL_9(A,t,t,r,i,b,u,t,e);
1565 const XMLCh Attribute::TYPE_NAME[] = UNICODE_LITERAL_13(A,t,t,r,i,b,u,t,e,T,y,p,e);
1566 const XMLCh Attribute::NAME_ATTRIB_NAME[] = UNICODE_LITERAL_4(N,a,m,e);
1567 const XMLCh Attribute::NAMEFORMAT_ATTRIB_NAME[] = UNICODE_LITERAL_10(N,a,m,e,F,o,r,m,a,t);
1568 const XMLCh Attribute::FRIENDLYNAME_ATTRIB_NAME[] = UNICODE_LITERAL_12(F,r,i,e,n,d,l,y,N,a,m,e);
1569 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);
1570 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);
1571 const XMLCh AttributeValue::LOCAL_NAME[] = UNICODE_LITERAL_14(A,t,t,r,i,b,u,t,e,V,a,l,u,e);
1572 const XMLCh Audience::LOCAL_NAME[] = UNICODE_LITERAL_8(A,u,d,i,e,n,c,e);
1573 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);
1574 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);
1575 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);
1576 const XMLCh AuthnContext::LOCAL_NAME[] = UNICODE_LITERAL_12(A,u,t,h,n,C,o,n,t,e,x,t);
1577 const XMLCh AuthnContext::TYPE_NAME[] = UNICODE_LITERAL_16(A,u,t,h,n,C,o,n,t,e,x,t,T,y,p,e);
1578 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);
1579 const XMLCh AuthnContextDecl::LOCAL_NAME[] = UNICODE_LITERAL_16(A,u,t,h,n,C,o,n,t,e,x,t,D,e,c,l);
1580 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);
1581 const XMLCh AuthnStatement::LOCAL_NAME[] = UNICODE_LITERAL_14(A,u,t,h,n,S,t,a,t,e,m,e,n,t);
1582 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);
1583 const XMLCh AuthnStatement::AUTHNINSTANT_ATTRIB_NAME[] = UNICODE_LITERAL_12(A,u,t,h,n,I,n,s,t,a,n,t);
1584 const XMLCh AuthnStatement::SESSIONINDEX_ATTRIB_NAME[] = UNICODE_LITERAL_12(S,e,s,s,i,o,n,I,n,d,e,x);
1585 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);
1586 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);
1587 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);
1588 const XMLCh AuthzDecisionStatement::RESOURCE_ATTRIB_NAME[] = UNICODE_LITERAL_8(R,e,s,o,u,r,c,e);
1589 const XMLCh AuthzDecisionStatement::DECISION_ATTRIB_NAME[] = UNICODE_LITERAL_8(D,e,c,i,s,i,o,n);
1590 const XMLCh AuthzDecisionStatement::DECISION_PERMIT[] = UNICODE_LITERAL_6(P,e,r,m,i,t);
1591 const XMLCh AuthzDecisionStatement::DECISION_DENY[] = UNICODE_LITERAL_4(D,e,n,y);
1592 const XMLCh AuthzDecisionStatement::DECISION_INDETERMINATE[] = UNICODE_LITERAL_13(I,n,d,e,t,e,r,m,i,n,a,t,e);
1593 const XMLCh BaseID::LOCAL_NAME[] = UNICODE_LITERAL_6(B,a,s,e,I,D);
1594 const XMLCh BaseID::NAMEQUALIFIER_ATTRIB_NAME[] = UNICODE_LITERAL_13(N,a,m,e,Q,u,a,l,i,f,i,e,r);
1595 const XMLCh BaseID::SPNAMEQUALIFIER_ATTRIB_NAME[] = UNICODE_LITERAL_15(S,P,N,a,m,e,Q,u,a,l,i,f,i,e,r);
1596 const XMLCh Condition::LOCAL_NAME[] = UNICODE_LITERAL_9(C,o,n,d,i,t,i,o,n);
1597 const XMLCh Conditions::LOCAL_NAME[] = UNICODE_LITERAL_10(C,o,n,d,i,t,i,o,n,s);
1598 const XMLCh Conditions::TYPE_NAME[] = UNICODE_LITERAL_14(C,o,n,d,i,t,i,o,n,s,T,y,p,e);
1599 const XMLCh Conditions::NOTBEFORE_ATTRIB_NAME[] = UNICODE_LITERAL_9(N,o,t,B,e,f,o,r,e);
1600 const XMLCh Conditions::NOTONORAFTER_ATTRIB_NAME[] =UNICODE_LITERAL_12(N,o,t,O,n,O,r,A,f,t,e,r);
1601 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);
1602 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);
1603 const XMLCh EncryptedElementType::LOCAL_NAME[] = {chNull};
1604 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);
1605 const XMLCh EncryptedID::LOCAL_NAME[] = UNICODE_LITERAL_11(E,n,c,r,y,p,t,e,d,I,d);
1606 const XMLCh Evidence::LOCAL_NAME[] = UNICODE_LITERAL_8(E,v,i,d,e,n,c,e);
1607 const XMLCh Evidence::TYPE_NAME[] = UNICODE_LITERAL_12(E,v,i,d,e,n,c,e,T,y,p,e);
1608 const XMLCh Issuer::LOCAL_NAME[] = UNICODE_LITERAL_6(I,s,s,u,e,r);
1609 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);
1610 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);
1611 const XMLCh NameID::LOCAL_NAME[] = UNICODE_LITERAL_6(N,a,m,e,I,D);
1612 const XMLCh NameIDType::LOCAL_NAME[] = {chNull};
1613 const XMLCh NameIDType::TYPE_NAME[] = UNICODE_LITERAL_10(N,a,m,e,I,D,T,y,p,e);
1614 const XMLCh NameIDType::NAMEQUALIFIER_ATTRIB_NAME[] = UNICODE_LITERAL_13(N,a,m,e,Q,u,a,l,i,f,i,e,r);
1615 const XMLCh NameIDType::SPNAMEQUALIFIER_ATTRIB_NAME[] = UNICODE_LITERAL_15(S,P,N,a,m,e,Q,u,a,l,i,f,i,e,r);
1616 const XMLCh NameIDType::FORMAT_ATTRIB_NAME[] = UNICODE_LITERAL_6(F,o,r,m,a,t);
1617 const XMLCh NameIDType::SPPROVIDEDID_ATTRIB_NAME[] = UNICODE_LITERAL_12(S,P,P,r,o,v,i,d,e,d,I,D);
1618 const XMLCh OneTimeUse::LOCAL_NAME[] = UNICODE_LITERAL_10(O,n,e,T,i,m,e,U,s,e);
1619 const XMLCh OneTimeUse::TYPE_NAME[] = UNICODE_LITERAL_14(O,n,e,T,i,m,e,U,s,e,T,y,p,e);
1620 const XMLCh ProxyRestriction::LOCAL_NAME[] = UNICODE_LITERAL_16(P,r,o,x,y,R,e,s,t,r,i,c,t,i,o,n);
1621 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);
1622 const XMLCh ProxyRestriction::COUNT_ATTRIB_NAME[] = UNICODE_LITERAL_5(C,o,u,n,t);
1623 const XMLCh Statement::LOCAL_NAME[] = UNICODE_LITERAL_9(S,t,a,t,e,m,e,n,t);
1624 const XMLCh Subject::LOCAL_NAME[] = UNICODE_LITERAL_7(S,u,b,j,e,c,t);
1625 const XMLCh Subject::TYPE_NAME[] = UNICODE_LITERAL_11(S,u,b,j,e,c,t,T,y,p,e);
1626 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);
1627 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);
1628 const XMLCh SubjectConfirmation::METHOD_ATTRIB_NAME[] = UNICODE_LITERAL_6(M,e,t,h,o,d);
1629 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);
1630 const XMLCh SubjectConfirmationDataType::NOTBEFORE_ATTRIB_NAME[] = UNICODE_LITERAL_9(N,o,t,B,e,f,o,r,e);
1631 const XMLCh SubjectConfirmationDataType::NOTONORAFTER_ATTRIB_NAME[] = UNICODE_LITERAL_12(N,o,t,O,n,O,r,A,f,t,e,r);
1632 const XMLCh SubjectConfirmationDataType::INRESPONSETO_ATTRIB_NAME[] = UNICODE_LITERAL_12(I,n,R,e,s,p,o,n,s,e,T,o);
1633 const XMLCh SubjectConfirmationDataType::RECIPIENT_ATTRIB_NAME[] = UNICODE_LITERAL_9(R,e,c,i,p,i,e,n,t);
1634 const XMLCh SubjectConfirmationDataType::ADDRESS_ATTRIB_NAME[] = UNICODE_LITERAL_7(A,d,d,r,e,s,s);
1635 const XMLCh SubjectLocality::LOCAL_NAME[] = UNICODE_LITERAL_15(S,u,b,j,e,c,t,L,o,c,a,l,i,t,y);
1636 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);
1637 const XMLCh SubjectLocality::ADDRESS_ATTRIB_NAME[] =UNICODE_LITERAL_7(A,d,d,r,e,s,s);
1638 const XMLCh SubjectLocality::DNSNAME_ATTRIB_NAME[] =UNICODE_LITERAL_7(D,N,S,N,a,m,e);
1640 const XMLCh NameIDType::UNSPECIFIED[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified
1641 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1642 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1643 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1644 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1645 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1646 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
1649 const XMLCh NameIDType::EMAIL[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress
1650 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1651 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1652 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1653 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1654 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1655 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
1658 const XMLCh NameIDType::X509_SUBJECT[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName
1659 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1660 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1661 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1662 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1663 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1664 chLatin_X, chDigit_5, chDigit_0, chDigit_9, chLatin_S, chLatin_u, chLatin_b, chLatin_j, chLatin_e, chLatin_c, chLatin_t,
1665 chLatin_N, chLatin_a, chLatin_m, chLatin_e, chNull
1668 const XMLCh NameIDType::WIN_DOMAIN_QUALIFIED[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName
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_1, chPeriod, chDigit_1, 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_W, chLatin_i, chLatin_n, chLatin_d, chLatin_o, chLatin_w, chLatin_s,
1675 chLatin_D, chLatin_o, chLatin_m, chLatin_a, chLatin_i, chLatin_n,
1676 chLatin_Q, chLatin_u, chLatin_a, chLatin_l, chLatin_i, chLatin_f, chLatin_i, chLatin_e, chLatin_d,
1677 chLatin_N, chLatin_a, chLatin_m, chLatin_e, chNull
1680 const XMLCh NameIDType::KERBEROS[] = // urn:oasis:names:tc:SAML:2.0:nameid-format:kerberos
1681 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1682 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1683 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1684 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1685 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1686 chLatin_k, chLatin_e, chLatin_r, chLatin_b, chLatin_e, chLatin_r, chLatin_o, chLatin_s, chNull
1689 const XMLCh NameIDType::ENTITY[] = // urn:oasis:names:tc:SAML:2.0:nameid-format:entity
1690 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1691 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1692 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1693 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1694 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1695 chLatin_e, chLatin_n, chLatin_t, chLatin_i, chLatin_t, chLatin_y, chNull
1698 const XMLCh NameIDType::PERSISTENT[] = // urn:oasis:names:tc:SAML:2.0:nameid-format:persistent
1699 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1700 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1701 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1702 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1703 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1704 chLatin_p, chLatin_e, chLatin_r, chLatin_s, chLatin_i, chLatin_s, chLatin_t, chLatin_e, chLatin_n, chLatin_t, chNull
1707 const XMLCh NameIDType::TRANSIENT[] = // urn:oasis:names:tc:SAML:2.0:nameid-format:transient
1708 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1709 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1710 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1711 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1712 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1713 chLatin_t, chLatin_r, chLatin_a, chLatin_n, chLatin_s, chLatin_i, chLatin_e, chLatin_n, chLatin_t, chNull
1716 const XMLCh SubjectConfirmation::BEARER[] = // urn:oasis:names:tc:SAML:2.0:cm:bearer
1717 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1718 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1719 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1720 chLatin_c, chLatin_m, chColon, chLatin_b, chLatin_e, chLatin_a, chLatin_r, chLatin_e, chLatin_r, chNull
1723 const XMLCh SubjectConfirmation::HOLDER_KEY[] = // urn:oasis:names:tc:SAML:2.0:cm:holder-of-key
1724 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1725 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1726 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1727 chLatin_c, chLatin_m, chColon, chLatin_h, chLatin_o, chLatin_l, chLatin_d, chLatin_e, chLatin_r, chDash,
1728 chLatin_o, chLatin_f, chDash, chLatin_k, chLatin_e, chLatin_y, chNull
1731 const XMLCh SubjectConfirmation::SENDER_VOUCHES[] = // urn:oasis:names:tc:SAML:2.0:cm:sender-vouches
1732 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1733 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1734 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1735 chLatin_c, chLatin_m, chColon, chLatin_s, chLatin_e, chLatin_n, chLatin_d, chLatin_e, chLatin_r, chDash,
1736 chLatin_v, chLatin_o, chLatin_u, chLatin_c, chLatin_h, chLatin_e, chLatin_s, chNull
1739 const XMLCh Action::RWEDC_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:rwedc
1740 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1741 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1742 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1743 chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1744 chLatin_r, chLatin_w, chLatin_e, chLatin_d, chLatin_c, chNull
1747 const XMLCh Action::RWEDC_NEG_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:rwedc-negation
1748 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1749 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1750 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1751 chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1752 chLatin_r, chLatin_w, chLatin_e, chLatin_d, chLatin_c, chDash,
1753 chLatin_n, chLatin_e, chLatin_g, chLatin_a, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chNull
1756 const XMLCh Action::GHPP_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:ghpp
1757 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1758 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1759 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1760 chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1761 chLatin_g, chLatin_h, chLatin_p, chLatin_p, chNull
1764 const XMLCh Action::UNIX_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:unix
1765 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1766 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1767 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1768 chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1769 chLatin_u, chLatin_n, chLatin_i, chLatin_x, chNull
1772 const XMLCh Attribute::UNSPECIFIED[] = // urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified
1773 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1774 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1775 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1776 chLatin_a, chLatin_t, chLatin_t, chLatin_r, chLatin_n, chLatin_a, chLatin_m, chLatin_e, chDash,
1777 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1778 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
1781 const XMLCh Attribute::URI_REFERENCE[] = // urn:oasis:names:tc:SAML:2.0:attrname-format:uri
1782 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1783 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1784 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1785 chLatin_a, chLatin_t, chLatin_t, chLatin_r, chLatin_n, chLatin_a, chLatin_m, chLatin_e, chDash,
1786 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1787 chLatin_u, chLatin_r, chLatin_i, chNull
1790 const XMLCh Attribute::BASIC[] = // urn:oasis:names:tc:SAML:2.0:attrname-format:basic
1791 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1792 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1793 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1794 chLatin_a, chLatin_t, chLatin_t, chLatin_r, chLatin_n, chLatin_a, chLatin_m, chLatin_e, chDash,
1795 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1796 chLatin_b, chLatin_a, chLatin_s, chLatin_i, chLatin_c, chNull