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 SubjectConfirmationDataTypeImpl : public virtual SubjectConfirmationDataType,
437 public AbstractDOMCachingXMLObject,
438 public AbstractXMLObjectMarshaller,
439 public AbstractXMLObjectUnmarshaller
442 m_NotBefore=m_NotOnOrAfter=NULL;
443 m_Recipient=m_InResponseTo=m_Address=NULL;
447 SubjectConfirmationDataTypeImpl() {
452 virtual ~SubjectConfirmationDataTypeImpl() {
454 delete m_NotOnOrAfter;
455 XMLString::release(&m_Recipient);
456 XMLString::release(&m_InResponseTo);
457 XMLString::release(&m_Address);
460 SubjectConfirmationDataTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
461 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
465 SubjectConfirmationDataTypeImpl(const SubjectConfirmationDataTypeImpl& src) : AbstractDOMCachingXMLObject(src) {
467 setNotBefore(src.getNotBefore());
468 setNotOnOrAfter(src.getNotOnOrAfter());
469 setRecipient(src.getRecipient());
470 setInResponseTo(src.getInResponseTo());
471 setAddress(src.getAddress());
474 IMPL_DATETIME_ATTRIB(NotBefore,0);
475 IMPL_DATETIME_ATTRIB(NotOnOrAfter,SAMLTIME_MAX);
476 IMPL_STRING_ATTRIB(Recipient);
477 IMPL_STRING_ATTRIB(InResponseTo);
478 IMPL_STRING_ATTRIB(Address);
481 void marshallAttributes(DOMElement* domElement) const {
482 MARSHALL_DATETIME_ATTRIB(NotBefore,NOTBEFORE,NULL);
483 MARSHALL_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,NULL);
484 MARSHALL_STRING_ATTRIB(Recipient,RECIPIENT,NULL);
485 MARSHALL_STRING_ATTRIB(InResponseTo,INRESPONSETO,NULL);
486 MARSHALL_STRING_ATTRIB(Address,ADDRESS,NULL);
489 void processAttribute(const DOMAttr* attribute) {
490 PROC_DATETIME_ATTRIB(NotBefore,NOTBEFORE,NULL);
491 PROC_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,NULL);
492 PROC_STRING_ATTRIB(Recipient,RECIPIENT,NULL);
493 PROC_STRING_ATTRIB(InResponseTo,INRESPONSETO,NULL);
494 PROC_STRING_ATTRIB(Address,ADDRESS,NULL);
495 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
499 class SAML_DLLLOCAL SubjectConfirmationDataImpl : public SubjectConfirmationData,
500 public SubjectConfirmationDataTypeImpl, public AnyElementImpl
503 virtual ~SubjectConfirmationDataImpl() {}
505 SubjectConfirmationDataImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
506 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
509 SubjectConfirmationDataImpl(const SubjectConfirmationDataImpl& src)
510 : SubjectConfirmationDataTypeImpl(src), AnyElementImpl(src) {
513 IMPL_XMLOBJECT_CLONE(SubjectConfirmationData);
514 SubjectConfirmationDataType* cloneSubjectConfirmationDataType() const {
515 return new SubjectConfirmationDataImpl(*this);
518 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
519 if (!qualifiedName.hasNamespaceURI()) {
520 if (XMLString::equals(qualifiedName.getLocalPart(),NOTBEFORE_ATTRIB_NAME)) {
524 else if (XMLString::equals(qualifiedName.getLocalPart(),NOTONORAFTER_ATTRIB_NAME)) {
525 setNotOnOrAfter(value);
528 else if (XMLString::equals(qualifiedName.getLocalPart(),RECIPIENT_ATTRIB_NAME)) {
532 else if (XMLString::equals(qualifiedName.getLocalPart(),INRESPONSETO_ATTRIB_NAME)) {
533 setInResponseTo(value);
536 else if (XMLString::equals(qualifiedName.getLocalPart(),ADDRESS_ATTRIB_NAME)) {
541 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
545 void marshallAttributes(DOMElement* domElement) const {
546 SubjectConfirmationDataTypeImpl::marshallAttributes(domElement);
547 AnyElementImpl::marshallAttributes(domElement);
551 class SAML_DLLLOCAL KeyInfoConfirmationDataTypeImpl : public virtual KeyInfoConfirmationDataType,
552 public SubjectConfirmationDataTypeImpl,
553 public AbstractComplexElement,
554 public AbstractAttributeExtensibleXMLObject
557 virtual ~KeyInfoConfirmationDataTypeImpl() {}
559 KeyInfoConfirmationDataTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
560 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
563 KeyInfoConfirmationDataTypeImpl(const KeyInfoConfirmationDataTypeImpl& src)
564 : AbstractXMLObject(src), SubjectConfirmationDataTypeImpl(src), AbstractComplexElement(src),
565 AbstractAttributeExtensibleXMLObject(src) {
566 VectorOf(KeyInfo) v=getKeyInfos();
567 for (vector<KeyInfo*>::const_iterator i=src.m_KeyInfos.begin(); i!=src.m_KeyInfos.end(); ++i)
568 v.push_back((*i)->cloneKeyInfo());
571 IMPL_XMLOBJECT_CLONE(KeyInfoConfirmationDataType);
572 SubjectConfirmationDataType* cloneSubjectConfirmationDataType() const {
573 return new KeyInfoConfirmationDataTypeImpl(*this);
576 IMPL_TYPED_CHILDREN(KeyInfo,m_children.end());
579 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
580 if (!qualifiedName.hasNamespaceURI()) {
581 if (XMLString::equals(qualifiedName.getLocalPart(),NOTBEFORE_ATTRIB_NAME)) {
585 else if (XMLString::equals(qualifiedName.getLocalPart(),NOTONORAFTER_ATTRIB_NAME)) {
586 setNotOnOrAfter(value);
589 else if (XMLString::equals(qualifiedName.getLocalPart(),RECIPIENT_ATTRIB_NAME)) {
593 else if (XMLString::equals(qualifiedName.getLocalPart(),INRESPONSETO_ATTRIB_NAME)) {
594 setInResponseTo(value);
597 else if (XMLString::equals(qualifiedName.getLocalPart(),ADDRESS_ATTRIB_NAME)) {
602 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
606 void marshallAttributes(DOMElement* domElement) const {
607 SubjectConfirmationDataTypeImpl::marshallAttributes(domElement);
608 marshallExtensionAttributes(domElement);
611 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
612 PROC_TYPED_CHILDREN(KeyInfo,XMLSIG_NS,false);
613 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
616 void processAttribute(const DOMAttr* attribute) {
617 unmarshallExtensionAttribute(attribute);
621 class SAML_DLLLOCAL SubjectConfirmationImpl : public virtual SubjectConfirmation,
622 public AbstractComplexElement,
623 public AbstractDOMCachingXMLObject,
624 public AbstractXMLObjectMarshaller,
625 public AbstractXMLObjectUnmarshaller
632 m_SubjectConfirmationData=NULL;
633 m_children.push_back(NULL);
634 m_children.push_back(NULL);
635 m_children.push_back(NULL);
636 m_children.push_back(NULL);
637 m_pos_BaseID=m_children.begin();
638 m_pos_NameID=m_pos_BaseID;
640 m_pos_EncryptedID=m_pos_NameID;
642 m_pos_SubjectConfirmationData=m_pos_EncryptedID;
643 ++m_pos_SubjectConfirmationData;
646 virtual ~SubjectConfirmationImpl() {}
648 SubjectConfirmationImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
649 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
653 SubjectConfirmationImpl(const SubjectConfirmationImpl& src)
654 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
656 setMethod(src.getMethod());
658 setBaseID(src.getBaseID()->cloneBaseID());
660 setNameID(src.getNameID()->cloneNameID());
661 if (src.getEncryptedID())
662 setEncryptedID(src.getEncryptedID()->cloneEncryptedID());
663 if (src.getSubjectConfirmationData())
664 setSubjectConfirmationData(src.getSubjectConfirmationData()->clone());
667 IMPL_XMLOBJECT_CLONE(SubjectConfirmation);
668 IMPL_STRING_ATTRIB(Method);
669 IMPL_TYPED_CHILD(BaseID);
670 IMPL_TYPED_CHILD(NameID);
671 IMPL_TYPED_CHILD(EncryptedID);
672 IMPL_XMLOBJECT_CHILD(SubjectConfirmationData);
675 void marshallAttributes(DOMElement* domElement) const {
676 MARSHALL_STRING_ATTRIB(Method,METHOD,NULL);
679 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
680 PROC_TYPED_CHILD(BaseID,SAML20_NS,false);
681 PROC_TYPED_CHILD(NameID,SAML20_NS,false);
682 PROC_TYPED_CHILD(EncryptedID,SAML20_NS,false);
683 PROC_XMLOBJECT_CHILD(SubjectConfirmationData,SAML20_NS);
684 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
687 void processAttribute(const DOMAttr* attribute) {
688 PROC_STRING_ATTRIB(Method,METHOD,NULL);
689 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
693 class SAML_DLLLOCAL SubjectImpl : public virtual Subject,
694 public AbstractComplexElement,
695 public AbstractDOMCachingXMLObject,
696 public AbstractXMLObjectMarshaller,
697 public AbstractXMLObjectUnmarshaller
703 m_children.push_back(NULL);
704 m_children.push_back(NULL);
705 m_children.push_back(NULL);
706 m_pos_BaseID=m_children.begin();
707 m_pos_NameID=m_pos_BaseID;
709 m_pos_EncryptedID=m_pos_NameID;
713 virtual ~SubjectImpl() {}
715 SubjectImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
716 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
720 SubjectImpl(const SubjectImpl& src)
721 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
724 setBaseID(src.getBaseID()->cloneBaseID());
726 setNameID(src.getNameID()->cloneNameID());
727 if (src.getEncryptedID())
728 setEncryptedID(src.getEncryptedID()->cloneEncryptedID());
729 VectorOf(SubjectConfirmation) v=getSubjectConfirmations();
730 for (vector<SubjectConfirmation*>::const_iterator i=src.m_SubjectConfirmations.begin(); i!=src.m_SubjectConfirmations.end(); i++) {
732 v.push_back((*i)->cloneSubjectConfirmation());
737 IMPL_XMLOBJECT_CLONE(Subject);
738 IMPL_TYPED_CHILD(NameID);
739 IMPL_TYPED_CHILD(BaseID);
740 IMPL_TYPED_CHILD(EncryptedID);
741 IMPL_TYPED_CHILDREN(SubjectConfirmation,m_children.end());
744 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
745 PROC_TYPED_CHILD(BaseID,SAML20_NS,false);
746 PROC_TYPED_CHILD(NameID,SAML20_NS,false);
747 PROC_TYPED_CHILD(EncryptedID,SAML20_NS,false);
748 PROC_TYPED_CHILDREN(SubjectConfirmation,SAML20_NS,false);
749 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
753 class SAML_DLLLOCAL SubjectLocalityImpl : public virtual SubjectLocality,
754 public AbstractSimpleElement,
755 public AbstractDOMCachingXMLObject,
756 public AbstractXMLObjectMarshaller,
757 public AbstractXMLObjectUnmarshaller
760 m_Address=m_DNSName=NULL;
763 virtual ~SubjectLocalityImpl() {
764 XMLString::release(&m_Address);
765 XMLString::release(&m_DNSName);
768 SubjectLocalityImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
769 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
773 SubjectLocalityImpl(const SubjectLocalityImpl& src)
774 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
776 setAddress(src.getAddress());
777 setDNSName(src.getDNSName());
780 IMPL_XMLOBJECT_CLONE(SubjectLocality);
781 IMPL_STRING_ATTRIB(Address);
782 IMPL_STRING_ATTRIB(DNSName);
785 void marshallAttributes(DOMElement* domElement) const {
786 MARSHALL_STRING_ATTRIB(Address,ADDRESS,NULL);
787 MARSHALL_STRING_ATTRIB(DNSName,DNSNAME,NULL);
790 void processAttribute(const DOMAttr* attribute) {
791 PROC_STRING_ATTRIB(Address,ADDRESS,NULL);
792 PROC_STRING_ATTRIB(DNSName,DNSNAME,NULL);
793 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
797 //TODO need unit test for this
798 class SAML_DLLLOCAL AuthnContextDeclImpl : public virtual AuthnContextDecl, public AnyElementImpl
801 virtual ~AuthnContextDeclImpl() {}
803 AuthnContextDeclImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
804 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
807 AuthnContextDeclImpl(const AuthnContextDeclImpl& src) : AnyElementImpl(src) {
810 IMPL_XMLOBJECT_CLONE(AuthnContextDecl);
813 class SAML_DLLLOCAL AuthnContextImpl : public virtual AuthnContext,
814 public AbstractComplexElement,
815 public AbstractDOMCachingXMLObject,
816 public AbstractXMLObjectMarshaller,
817 public AbstractXMLObjectUnmarshaller
820 m_AuthnContextClassRef=NULL;
821 m_AuthnContextDecl=NULL;
822 m_AuthnContextDeclRef=NULL;
823 m_children.push_back(NULL);
824 m_children.push_back(NULL);
825 m_children.push_back(NULL);
826 m_pos_AuthnContextClassRef=m_children.begin();
827 m_pos_AuthnContextDecl=m_pos_AuthnContextClassRef;
828 ++m_pos_AuthnContextDecl;
829 m_pos_AuthnContextDeclRef=m_pos_AuthnContextDecl;
830 ++m_pos_AuthnContextDeclRef;
833 virtual ~AuthnContextImpl() {}
835 AuthnContextImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
836 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
840 AuthnContextImpl(const AuthnContextImpl& src)
841 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
843 if (src.getAuthnContextClassRef())
844 setAuthnContextClassRef(src.getAuthnContextClassRef()->cloneAuthnContextClassRef());
845 if (src.getAuthnContextDecl())
846 setAuthnContextDecl(src.getAuthnContextDecl()->clone());
847 if (src.getAuthnContextDeclRef())
848 setAuthnContextDeclRef(src.getAuthnContextDeclRef()->cloneAuthnContextDeclRef());
849 VectorOf(AuthenticatingAuthority) v=getAuthenticatingAuthoritys();
850 for (vector<AuthenticatingAuthority*>::const_iterator i=src.m_AuthenticatingAuthoritys.begin(); i!=src.m_AuthenticatingAuthoritys.end(); i++) {
852 v.push_back((*i)->cloneAuthenticatingAuthority());
857 IMPL_XMLOBJECT_CLONE(AuthnContext);
858 IMPL_TYPED_CHILD(AuthnContextClassRef);
859 IMPL_XMLOBJECT_CHILD(AuthnContextDecl);
860 IMPL_TYPED_CHILD(AuthnContextDeclRef);
861 IMPL_TYPED_CHILDREN(AuthenticatingAuthority,m_children.end());
864 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
865 PROC_TYPED_CHILD(AuthnContextClassRef,SAML20_NS,false);
866 PROC_XMLOBJECT_CHILD(AuthnContextDecl,SAML20_NS);
867 PROC_TYPED_CHILD(AuthnContextDeclRef,SAML20_NS,false);
868 PROC_TYPED_CHILDREN(AuthenticatingAuthority,SAML20_NS,false);
869 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
873 class SAML_DLLLOCAL AuthnStatementImpl : public virtual AuthnStatement,
874 public AbstractComplexElement,
875 public AbstractDOMCachingXMLObject,
876 public AbstractXMLObjectMarshaller,
877 public AbstractXMLObjectUnmarshaller
882 m_SessionNotOnOrAfter=NULL;
883 m_SubjectLocality=NULL;
885 m_children.push_back(NULL);
886 m_children.push_back(NULL);
887 m_pos_SubjectLocality=m_children.begin();
888 m_pos_AuthnContext=m_pos_SubjectLocality;
889 ++m_pos_AuthnContext;
892 virtual ~AuthnStatementImpl() {
893 delete m_AuthnInstant;
894 XMLString::release(&m_SessionIndex);
895 delete m_SessionNotOnOrAfter;
898 AuthnStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
899 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
903 AuthnStatementImpl(const AuthnStatementImpl& src)
904 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
906 setAuthnInstant(src.getAuthnInstant());
907 setSessionIndex(src.getSessionIndex());
908 setSessionNotOnOrAfter(src.getSessionNotOnOrAfter());
909 if (src.getSubjectLocality())
910 setSubjectLocality(src.getSubjectLocality()->cloneSubjectLocality());
911 if (src.getAuthnContext())
912 setAuthnContext(src.getAuthnContext()->cloneAuthnContext());
915 IMPL_XMLOBJECT_CLONE(AuthnStatement);
916 Statement* cloneStatement() const {
917 return cloneAuthnStatement();
919 IMPL_DATETIME_ATTRIB(AuthnInstant,0);
920 IMPL_STRING_ATTRIB(SessionIndex);
921 IMPL_DATETIME_ATTRIB(SessionNotOnOrAfter,SAMLTIME_MAX);
922 IMPL_TYPED_CHILD(SubjectLocality);
923 IMPL_TYPED_CHILD(AuthnContext);
926 void marshallAttributes(DOMElement* domElement) const {
927 MARSHALL_DATETIME_ATTRIB(AuthnInstant,AUTHNINSTANT,NULL);
928 MARSHALL_STRING_ATTRIB(SessionIndex,SESSIONINDEX,NULL);
929 MARSHALL_DATETIME_ATTRIB(SessionNotOnOrAfter,SESSIONNOTONORAFTER,NULL);
932 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
933 PROC_TYPED_CHILD(SubjectLocality,SAML20_NS,false);
934 PROC_TYPED_CHILD(AuthnContext,SAML20_NS,false);
935 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
938 void processAttribute(const DOMAttr* attribute) {
939 PROC_DATETIME_ATTRIB(AuthnInstant,AUTHNINSTANT,NULL);
940 PROC_STRING_ATTRIB(SessionIndex,SESSIONINDEX,NULL);
941 PROC_DATETIME_ATTRIB(SessionNotOnOrAfter,SESSIONNOTONORAFTER,NULL);
942 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
946 class SAML_DLLLOCAL ActionImpl : public virtual Action,
947 public AbstractSimpleElement,
948 public AbstractDOMCachingXMLObject,
949 public AbstractXMLObjectMarshaller,
950 public AbstractXMLObjectUnmarshaller
953 virtual ~ActionImpl() {
954 XMLString::release(&m_Namespace);
957 ActionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
958 : AbstractXMLObject(nsURI, localName, prefix, schemaType), m_Namespace(NULL) {
961 ActionImpl(const ActionImpl& src)
962 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
963 setNamespace(src.getNamespace());
966 IMPL_XMLOBJECT_CLONE(Action);
967 IMPL_STRING_ATTRIB(Namespace);
970 void marshallAttributes(DOMElement* domElement) const {
971 MARSHALL_STRING_ATTRIB(Namespace,NAMESPACE,NULL);
974 void processAttribute(const DOMAttr* attribute) {
975 PROC_STRING_ATTRIB(Namespace,NAMESPACE,NULL);
976 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
980 class SAML_DLLLOCAL EvidenceImpl : public virtual Evidence,
981 public AbstractComplexElement,
982 public AbstractDOMCachingXMLObject,
983 public AbstractXMLObjectMarshaller,
984 public AbstractXMLObjectUnmarshaller
987 virtual ~EvidenceImpl() {}
989 EvidenceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
990 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
993 EvidenceImpl(const EvidenceImpl& src)
994 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
995 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
997 AssertionIDRef* ref=dynamic_cast<AssertionIDRef*>(*i);
999 getAssertionIDRefs().push_back(ref->cloneAssertionIDRef());
1003 AssertionURIRef* uri=dynamic_cast<AssertionURIRef*>(*i);
1005 getAssertionURIRefs().push_back(uri->cloneAssertionURIRef());
1009 Assertion* assertion=dynamic_cast<Assertion*>(*i);
1011 getAssertions().push_back(assertion->cloneAssertion());
1015 EncryptedAssertion* enc=dynamic_cast<EncryptedAssertion*>(*i);
1017 getEncryptedAssertions().push_back(enc->cloneEncryptedAssertion());
1024 IMPL_XMLOBJECT_CLONE(Evidence);
1025 IMPL_TYPED_CHILDREN(AssertionIDRef,m_children.end());
1026 IMPL_TYPED_CHILDREN(AssertionURIRef,m_children.end());
1027 IMPL_TYPED_CHILDREN(Assertion,m_children.end());
1028 IMPL_TYPED_CHILDREN(EncryptedAssertion,m_children.end());
1031 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1032 PROC_TYPED_CHILDREN(AssertionIDRef,SAML20_NS,false);
1033 PROC_TYPED_CHILDREN(AssertionURIRef,SAML20_NS,false);
1034 PROC_TYPED_CHILDREN(Assertion,SAML20_NS,false);
1035 PROC_TYPED_CHILDREN(EncryptedAssertion,SAML20_NS,false);
1036 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1040 class SAML_DLLLOCAL AuthzDecisionStatementImpl : public virtual AuthzDecisionStatement,
1041 public AbstractComplexElement,
1042 public AbstractDOMCachingXMLObject,
1043 public AbstractXMLObjectMarshaller,
1044 public AbstractXMLObjectUnmarshaller
1050 m_children.push_back(NULL);
1051 m_pos_Evidence=m_children.begin();
1054 virtual ~AuthzDecisionStatementImpl() {
1055 XMLString::release(&m_Resource);
1056 XMLString::release(&m_Decision);
1059 AuthzDecisionStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1060 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1064 AuthzDecisionStatementImpl(const AuthzDecisionStatementImpl& src)
1065 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
1067 setResource(src.getResource());
1068 setDecision(src.getDecision());
1069 if (src.getEvidence())
1070 setEvidence(src.getEvidence()->cloneEvidence());
1071 VectorOf(Action) v=getActions();
1072 for (vector<Action*>::const_iterator i=src.m_Actions.begin(); i!=src.m_Actions.end(); i++) {
1074 v.push_back((*i)->cloneAction());
1079 IMPL_XMLOBJECT_CLONE(AuthzDecisionStatement);
1080 Statement* cloneStatement() const {
1081 return cloneAuthzDecisionStatement();
1083 IMPL_STRING_ATTRIB(Resource);
1084 IMPL_STRING_ATTRIB(Decision);
1085 IMPL_TYPED_CHILD(Evidence);
1086 IMPL_TYPED_CHILDREN(Action, m_pos_Evidence);
1089 void marshallAttributes(DOMElement* domElement) const {
1090 MARSHALL_STRING_ATTRIB(Resource,RESOURCE,NULL);
1091 MARSHALL_STRING_ATTRIB(Decision,DECISION,NULL);
1094 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1095 PROC_TYPED_CHILD(Evidence,SAML20_NS,false);
1096 PROC_TYPED_CHILDREN(Action,SAML20_NS,false);
1097 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1100 void processAttribute(const DOMAttr* attribute) {
1101 PROC_STRING_ATTRIB(Resource,RESOURCE,NULL);
1102 PROC_STRING_ATTRIB(Decision,DECISION,NULL);
1103 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
1107 //TODO need unit test for this
1108 class SAML_DLLLOCAL AttributeValueImpl : public virtual AttributeValue, public AnyElementImpl
1111 virtual ~AttributeValueImpl() {}
1113 AttributeValueImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1114 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1117 AttributeValueImpl(const AttributeValueImpl& src) : AnyElementImpl(src) {
1120 IMPL_XMLOBJECT_CLONE(AttributeValue);
1124 class SAML_DLLLOCAL AttributeImpl : public virtual Attribute,
1125 public AbstractComplexElement,
1126 public AbstractAttributeExtensibleXMLObject,
1127 public AbstractDOMCachingXMLObject,
1128 public AbstractXMLObjectMarshaller,
1129 public AbstractXMLObjectUnmarshaller
1132 m_Name=m_NameFormat=m_FriendlyName=NULL;
1135 virtual ~AttributeImpl() {
1136 XMLString::release(&m_Name);
1137 XMLString::release(&m_NameFormat);
1138 XMLString::release(&m_FriendlyName);
1141 AttributeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1142 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1146 AttributeImpl(const AttributeImpl& src)
1147 : AbstractXMLObject(src), AbstractComplexElement(src),
1148 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
1150 setName(src.getName());
1151 setNameFormat(src.getNameFormat());
1152 setFriendlyName(src.getFriendlyName());
1153 VectorOf(XMLObject) v=getAttributeValues();
1154 for (vector<XMLObject*>::const_iterator i=src.m_AttributeValues.begin(); i!=src.m_AttributeValues.end(); i++) {
1156 v.push_back((*i)->clone());
1161 IMPL_XMLOBJECT_CLONE(Attribute);
1162 IMPL_STRING_ATTRIB(Name);
1163 IMPL_STRING_ATTRIB(NameFormat);
1164 IMPL_STRING_ATTRIB(FriendlyName);
1165 IMPL_XMLOBJECT_CHILDREN(AttributeValue,m_children.end());
1167 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
1168 if (!qualifiedName.hasNamespaceURI()) {
1169 if (XMLString::equals(qualifiedName.getLocalPart(),NAME_ATTRIB_NAME)) {
1173 else if (XMLString::equals(qualifiedName.getLocalPart(),NAMEFORMAT_ATTRIB_NAME)) {
1174 setNameFormat(value);
1177 else if (XMLString::equals(qualifiedName.getLocalPart(),FRIENDLYNAME_ATTRIB_NAME)) {
1178 setFriendlyName(value);
1182 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
1186 void marshallAttributes(DOMElement* domElement) const {
1187 MARSHALL_STRING_ATTRIB(Name,NAME,NULL);
1188 MARSHALL_STRING_ATTRIB(NameFormat,NAMEFORMAT,NULL);
1189 MARSHALL_STRING_ATTRIB(FriendlyName,FRIENDLYNAME,NULL);
1190 marshallExtensionAttributes(domElement);
1193 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1194 getAttributeValues().push_back(childXMLObject);
1197 void processAttribute(const DOMAttr* attribute) {
1198 unmarshallExtensionAttribute(attribute);
1202 //TODO unit test for this
1203 class SAML_DLLLOCAL EncryptedAttributeImpl : public virtual EncryptedAttribute, public EncryptedElementTypeImpl
1206 virtual ~EncryptedAttributeImpl() {}
1208 EncryptedAttributeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1209 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1211 EncryptedAttributeImpl(const EncryptedAttributeImpl& src) : AbstractXMLObject(src), EncryptedElementTypeImpl(src) {}
1213 IMPL_XMLOBJECT_CLONE(EncryptedAttribute);
1214 EncryptedElementType* cloneEncryptedElementType() const {
1215 return new EncryptedAttributeImpl(*this);
1219 class SAML_DLLLOCAL AttributeStatementImpl : public virtual AttributeStatement,
1220 public AbstractComplexElement,
1221 public AbstractDOMCachingXMLObject,
1222 public AbstractXMLObjectMarshaller,
1223 public AbstractXMLObjectUnmarshaller
1226 virtual ~AttributeStatementImpl() {}
1228 AttributeStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1229 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1232 AttributeStatementImpl(const AttributeStatementImpl& src)
1233 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
1234 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
1236 Attribute* attribute=dynamic_cast<Attribute*>(*i);
1238 getAttributes().push_back(attribute->cloneAttribute());
1242 EncryptedAttribute* enc=dynamic_cast<EncryptedAttribute*>(*i);
1244 getEncryptedAttributes().push_back(enc->cloneEncryptedAttribute());
1251 IMPL_XMLOBJECT_CLONE(AttributeStatement);
1252 Statement* cloneStatement() const {
1253 return cloneAttributeStatement();
1255 IMPL_TYPED_CHILDREN(Attribute, m_children.end());
1256 IMPL_TYPED_CHILDREN(EncryptedAttribute, m_children.end());
1259 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1260 PROC_TYPED_CHILDREN(Attribute,SAML20_NS,false);
1261 PROC_TYPED_CHILDREN(EncryptedAttribute,SAML20_NS,false);
1262 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1266 class SAML_DLLLOCAL AdviceImpl : public virtual Advice,
1267 public AbstractComplexElement,
1268 public AbstractDOMCachingXMLObject,
1269 public AbstractXMLObjectMarshaller,
1270 public AbstractXMLObjectUnmarshaller
1273 virtual ~AdviceImpl() {}
1275 AdviceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1276 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1279 AdviceImpl(const AdviceImpl& src)
1280 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
1281 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
1283 AssertionIDRef* ref=dynamic_cast<AssertionIDRef*>(*i);
1285 getAssertionIDRefs().push_back(ref->cloneAssertionIDRef());
1289 AssertionURIRef* uri=dynamic_cast<AssertionURIRef*>(*i);
1291 getAssertionURIRefs().push_back(uri->cloneAssertionURIRef());
1295 Assertion* assertion=dynamic_cast<Assertion*>(*i);
1297 getAssertions().push_back(assertion->cloneAssertion());
1301 EncryptedAssertion* enc=dynamic_cast<EncryptedAssertion*>(*i);
1303 getEncryptedAssertions().push_back(enc->cloneEncryptedAssertion());
1307 getUnknownXMLObjects().push_back((*i)->clone());
1312 IMPL_XMLOBJECT_CLONE(Advice);
1313 IMPL_TYPED_CHILDREN(AssertionIDRef,m_children.end());
1314 IMPL_TYPED_CHILDREN(AssertionURIRef,m_children.end());
1315 IMPL_TYPED_CHILDREN(Assertion,m_children.end());
1316 IMPL_TYPED_CHILDREN(EncryptedAssertion,m_children.end());
1317 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
1320 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1321 PROC_TYPED_CHILDREN(AssertionIDRef,SAML20_NS,false);
1322 PROC_TYPED_CHILDREN(AssertionURIRef,SAML20_NS,false);
1323 PROC_TYPED_CHILDREN(Assertion,SAML20_NS,false);
1324 PROC_TYPED_CHILDREN(EncryptedAssertion,SAML20_NS,false);
1327 const XMLCh* nsURI=root->getNamespaceURI();
1328 if (!XMLString::equals(nsURI,SAML20_NS) && nsURI && *nsURI) {
1329 getUnknownXMLObjects().push_back(childXMLObject);
1333 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1337 //TODO unit test for this
1338 class SAML_DLLLOCAL EncryptedAssertionImpl : public virtual EncryptedAssertion, public EncryptedElementTypeImpl
1341 virtual ~EncryptedAssertionImpl() {}
1343 EncryptedAssertionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1344 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1346 EncryptedAssertionImpl(const EncryptedAssertionImpl& src) : AbstractXMLObject(src), EncryptedElementTypeImpl(src) {}
1348 IMPL_XMLOBJECT_CLONE(EncryptedAssertion);
1349 EncryptedElementType* cloneEncryptedElementType() const {
1350 return new EncryptedAssertionImpl(*this);
1354 class SAML_DLLLOCAL AssertionImpl : public virtual Assertion,
1355 public AbstractComplexElement,
1356 public AbstractDOMCachingXMLObject,
1357 public AbstractXMLObjectMarshaller,
1358 public AbstractXMLObjectUnmarshaller
1363 m_IssueInstant=NULL;
1369 m_children.push_back(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_pos_Issuer=m_children.begin();
1375 m_pos_Signature=m_pos_Issuer;
1377 m_pos_Subject=m_pos_Signature;
1379 m_pos_Conditions=m_pos_Subject;
1381 m_pos_Advice=m_pos_Conditions;
1385 virtual ~AssertionImpl() {
1386 XMLString::release(&m_ID);
1387 XMLString::release(&m_Version);
1388 delete m_IssueInstant;
1391 AssertionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1392 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1396 AssertionImpl(const AssertionImpl& src)
1397 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
1399 setVersion(src.getVersion());
1401 setIssueInstant(src.getIssueInstant());
1402 if (src.getIssuer())
1403 setIssuer(src.getIssuer()->cloneIssuer());
1404 if (src.getSignature())
1405 setSignature(src.getSignature()->cloneSignature());
1406 if (src.getSubject())
1407 setSubject(src.getSubject()->cloneSubject());
1408 if (src.getConditions())
1409 setConditions(src.getConditions()->cloneConditions());
1410 if (src.getAdvice())
1411 setAdvice(src.getAdvice()->cloneAdvice());
1412 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
1414 AuthnStatement* authst=dynamic_cast<AuthnStatement*>(*i);
1416 getAuthnStatements().push_back(authst->cloneAuthnStatement());
1420 AttributeStatement* attst=dynamic_cast<AttributeStatement*>(*i);
1422 getAttributeStatements().push_back(attst->cloneAttributeStatement());
1426 AuthzDecisionStatement* authzst=dynamic_cast<AuthzDecisionStatement*>(*i);
1428 getAuthzDecisionStatements().push_back(authzst->cloneAuthzDecisionStatement());
1432 Statement* st=dynamic_cast<Statement*>(*i);
1434 getStatements().push_back(st->cloneStatement());
1441 //IMPL_TYPED_CHILD(Signature);
1442 // Need customized setter.
1444 Signature* m_Signature;
1445 list<XMLObject*>::iterator m_pos_Signature;
1447 Signature* getSignature() const {
1451 void setSignature(Signature* sig) {
1452 prepareForAssignment(m_Signature,sig);
1453 *m_pos_Signature=m_Signature=sig;
1454 // Sync content reference back up.
1456 m_Signature->setContentReference(new opensaml::ContentReference(*this));
1459 IMPL_XMLOBJECT_CLONE(Assertion);
1460 IMPL_STRING_ATTRIB(Version);
1462 IMPL_DATETIME_ATTRIB(IssueInstant,0);
1463 IMPL_TYPED_CHILD(Issuer);
1464 IMPL_TYPED_CHILD(Subject);
1465 IMPL_TYPED_CHILD(Conditions);
1466 IMPL_TYPED_CHILD(Advice);
1467 IMPL_TYPED_CHILDREN(Statement, m_children.end());
1468 IMPL_TYPED_CHILDREN(AuthnStatement, m_children.end());
1469 IMPL_TYPED_CHILDREN(AttributeStatement, m_children.end());
1470 IMPL_TYPED_CHILDREN(AuthzDecisionStatement, m_children.end());
1473 void marshallAttributes(DOMElement* domElement) const {
1475 const_cast<AssertionImpl*>(this)->m_Version=XMLString::transcode("2.0");
1476 MARSHALL_STRING_ATTRIB(Version,VER,NULL);
1478 const_cast<AssertionImpl*>(this)->m_ID=SAMLConfig::getConfig().generateIdentifier();
1479 MARSHALL_ID_ATTRIB(ID,ID,NULL);
1480 if (!m_IssueInstant) {
1481 const_cast<AssertionImpl*>(this)->m_IssueInstantEpoch=time(NULL);
1482 const_cast<AssertionImpl*>(this)->m_IssueInstant=new DateTime(m_IssueInstantEpoch);
1484 MARSHALL_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,NULL);
1487 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1488 PROC_TYPED_CHILD(Issuer,SAML20_NS,false);
1489 PROC_TYPED_CHILD(Signature,XMLSIG_NS,false);
1490 PROC_TYPED_CHILD(Subject,SAML20_NS,false);
1491 PROC_TYPED_CHILD(Conditions,SAML20_NS,false);
1492 PROC_TYPED_CHILD(Advice,SAML20_NS,false);
1493 PROC_TYPED_CHILDREN(AuthnStatement,SAML20_NS,false);
1494 PROC_TYPED_CHILDREN(AttributeStatement,SAML20_NS,false);
1495 PROC_TYPED_CHILDREN(AuthzDecisionStatement,SAML20_NS,false);
1496 PROC_TYPED_CHILDREN(Statement,SAML20_NS,false);
1497 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1500 void processAttribute(const DOMAttr* attribute) {
1501 PROC_STRING_ATTRIB(Version,VER,NULL);
1502 PROC_ID_ATTRIB(ID,ID,NULL);
1503 PROC_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,NULL);
1504 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
1511 #if defined (_MSC_VER)
1512 #pragma warning( pop )
1515 // Builder Implementations
1517 IMPL_XMLOBJECTBUILDER(Action);
1518 IMPL_XMLOBJECTBUILDER(Advice);
1519 IMPL_XMLOBJECTBUILDER(Assertion);
1520 IMPL_XMLOBJECTBUILDER(AssertionIDRef);
1521 IMPL_XMLOBJECTBUILDER(AssertionURIRef);
1522 IMPL_XMLOBJECTBUILDER(Attribute);
1523 IMPL_XMLOBJECTBUILDER(AttributeStatement);
1524 IMPL_XMLOBJECTBUILDER(AttributeValue);
1525 IMPL_XMLOBJECTBUILDER(Audience);
1526 IMPL_XMLOBJECTBUILDER(AudienceRestriction);
1527 IMPL_XMLOBJECTBUILDER(AuthenticatingAuthority);
1528 IMPL_XMLOBJECTBUILDER(AuthnContext);
1529 IMPL_XMLOBJECTBUILDER(AuthnContextClassRef);
1530 IMPL_XMLOBJECTBUILDER(AuthnContextDecl);
1531 IMPL_XMLOBJECTBUILDER(AuthnContextDeclRef);
1532 IMPL_XMLOBJECTBUILDER(AuthnStatement);
1533 IMPL_XMLOBJECTBUILDER(AuthzDecisionStatement);
1534 IMPL_XMLOBJECTBUILDER(Conditions);
1535 IMPL_XMLOBJECTBUILDER(EncryptedAssertion);
1536 IMPL_XMLOBJECTBUILDER(EncryptedAttribute);
1537 IMPL_XMLOBJECTBUILDER(EncryptedID);
1538 IMPL_XMLOBJECTBUILDER(Evidence);
1539 IMPL_XMLOBJECTBUILDER(Issuer);
1540 IMPL_XMLOBJECTBUILDER(KeyInfoConfirmationDataType);
1541 IMPL_XMLOBJECTBUILDER(NameID);
1542 IMPL_XMLOBJECTBUILDER(NameIDType);
1543 IMPL_XMLOBJECTBUILDER(OneTimeUse);
1544 IMPL_XMLOBJECTBUILDER(ProxyRestriction);
1545 IMPL_XMLOBJECTBUILDER(Subject);
1546 IMPL_XMLOBJECTBUILDER(SubjectConfirmation);
1547 IMPL_XMLOBJECTBUILDER(SubjectConfirmationData);
1548 IMPL_XMLOBJECTBUILDER(SubjectLocality);
1551 const XMLCh Action::LOCAL_NAME[] = UNICODE_LITERAL_6(A,c,t,i,o,n);
1552 const XMLCh Action::TYPE_NAME[] = UNICODE_LITERAL_10(A,c,t,i,o,n,T,y,p,e);
1553 const XMLCh Action::NAMESPACE_ATTRIB_NAME[] = UNICODE_LITERAL_9(N,a,m,e,s,p,a,c,e);
1554 const XMLCh Advice::LOCAL_NAME[] = UNICODE_LITERAL_6(A,d,v,i,c,e);
1555 const XMLCh Advice::TYPE_NAME[] = UNICODE_LITERAL_10(A,d,v,i,c,e,T,y,p,e);
1556 const XMLCh Assertion::LOCAL_NAME[] = UNICODE_LITERAL_9(A,s,s,e,r,t,i,o,n);
1557 const XMLCh Assertion::TYPE_NAME[] = UNICODE_LITERAL_13(A,s,s,e,r,t,i,o,n,T,y,p,e);
1558 const XMLCh Assertion::VER_ATTRIB_NAME[] = UNICODE_LITERAL_7(V,e,r,s,i,o,n);
1559 const XMLCh Assertion::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
1560 const XMLCh Assertion::ISSUEINSTANT_ATTRIB_NAME[] = UNICODE_LITERAL_12(I,s,s,u,e,I,n,s,t,a,n,t);
1561 const XMLCh AssertionIDRef::LOCAL_NAME[] = UNICODE_LITERAL_14(A,s,s,e,r,t,i,o,n,I,D,R,e,f);
1562 const XMLCh AssertionURIRef::LOCAL_NAME[] = UNICODE_LITERAL_15(A,s,s,e,r,t,i,o,n,U,R,I,R,e,f);
1563 const XMLCh Attribute::LOCAL_NAME[] = UNICODE_LITERAL_9(A,t,t,r,i,b,u,t,e);
1564 const XMLCh Attribute::TYPE_NAME[] = UNICODE_LITERAL_13(A,t,t,r,i,b,u,t,e,T,y,p,e);
1565 const XMLCh Attribute::NAME_ATTRIB_NAME[] = UNICODE_LITERAL_4(N,a,m,e);
1566 const XMLCh Attribute::NAMEFORMAT_ATTRIB_NAME[] = UNICODE_LITERAL_10(N,a,m,e,F,o,r,m,a,t);
1567 const XMLCh Attribute::FRIENDLYNAME_ATTRIB_NAME[] = UNICODE_LITERAL_12(F,r,i,e,n,d,l,y,N,a,m,e);
1568 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);
1569 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);
1570 const XMLCh AttributeValue::LOCAL_NAME[] = UNICODE_LITERAL_14(A,t,t,r,i,b,u,t,e,V,a,l,u,e);
1571 const XMLCh Audience::LOCAL_NAME[] = UNICODE_LITERAL_8(A,u,d,i,e,n,c,e);
1572 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);
1573 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);
1574 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);
1575 const XMLCh AuthnContext::LOCAL_NAME[] = UNICODE_LITERAL_12(A,u,t,h,n,C,o,n,t,e,x,t);
1576 const XMLCh AuthnContext::TYPE_NAME[] = UNICODE_LITERAL_16(A,u,t,h,n,C,o,n,t,e,x,t,T,y,p,e);
1577 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);
1578 const XMLCh AuthnContextDecl::LOCAL_NAME[] = UNICODE_LITERAL_16(A,u,t,h,n,C,o,n,t,e,x,t,D,e,c,l);
1579 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);
1580 const XMLCh AuthnStatement::LOCAL_NAME[] = UNICODE_LITERAL_14(A,u,t,h,n,S,t,a,t,e,m,e,n,t);
1581 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);
1582 const XMLCh AuthnStatement::AUTHNINSTANT_ATTRIB_NAME[] = UNICODE_LITERAL_12(A,u,t,h,n,I,n,s,t,a,n,t);
1583 const XMLCh AuthnStatement::SESSIONINDEX_ATTRIB_NAME[] = UNICODE_LITERAL_12(S,e,s,s,i,o,n,I,n,d,e,x);
1584 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);
1585 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);
1586 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);
1587 const XMLCh AuthzDecisionStatement::RESOURCE_ATTRIB_NAME[] = UNICODE_LITERAL_8(R,e,s,o,u,r,c,e);
1588 const XMLCh AuthzDecisionStatement::DECISION_ATTRIB_NAME[] = UNICODE_LITERAL_8(D,e,c,i,s,i,o,n);
1589 const XMLCh AuthzDecisionStatement::DECISION_PERMIT[] = UNICODE_LITERAL_6(P,e,r,m,i,t);
1590 const XMLCh AuthzDecisionStatement::DECISION_DENY[] = UNICODE_LITERAL_4(D,e,n,y);
1591 const XMLCh AuthzDecisionStatement::DECISION_INDETERMINATE[] = UNICODE_LITERAL_13(I,n,d,e,t,e,r,m,i,n,a,t,e);
1592 const XMLCh BaseID::LOCAL_NAME[] = UNICODE_LITERAL_6(B,a,s,e,I,D);
1593 const XMLCh BaseID::NAMEQUALIFIER_ATTRIB_NAME[] = UNICODE_LITERAL_13(N,a,m,e,Q,u,a,l,i,f,i,e,r);
1594 const XMLCh BaseID::SPNAMEQUALIFIER_ATTRIB_NAME[] = UNICODE_LITERAL_15(S,P,N,a,m,e,Q,u,a,l,i,f,i,e,r);
1595 const XMLCh Condition::LOCAL_NAME[] = UNICODE_LITERAL_9(C,o,n,d,i,t,i,o,n);
1596 const XMLCh Conditions::LOCAL_NAME[] = UNICODE_LITERAL_10(C,o,n,d,i,t,i,o,n,s);
1597 const XMLCh Conditions::TYPE_NAME[] = UNICODE_LITERAL_14(C,o,n,d,i,t,i,o,n,s,T,y,p,e);
1598 const XMLCh Conditions::NOTBEFORE_ATTRIB_NAME[] = UNICODE_LITERAL_9(N,o,t,B,e,f,o,r,e);
1599 const XMLCh Conditions::NOTONORAFTER_ATTRIB_NAME[] =UNICODE_LITERAL_12(N,o,t,O,n,O,r,A,f,t,e,r);
1600 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);
1601 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);
1602 const XMLCh EncryptedElementType::LOCAL_NAME[] = {chNull};
1603 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);
1604 const XMLCh EncryptedID::LOCAL_NAME[] = UNICODE_LITERAL_11(E,n,c,r,y,p,t,e,d,I,d);
1605 const XMLCh Evidence::LOCAL_NAME[] = UNICODE_LITERAL_8(E,v,i,d,e,n,c,e);
1606 const XMLCh Evidence::TYPE_NAME[] = UNICODE_LITERAL_12(E,v,i,d,e,n,c,e,T,y,p,e);
1607 const XMLCh Issuer::LOCAL_NAME[] = UNICODE_LITERAL_6(I,s,s,u,e,r);
1608 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);
1609 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);
1610 const XMLCh NameID::LOCAL_NAME[] = UNICODE_LITERAL_6(N,a,m,e,I,D);
1611 const XMLCh NameIDType::LOCAL_NAME[] = {chNull};
1612 const XMLCh NameIDType::TYPE_NAME[] = UNICODE_LITERAL_10(N,a,m,e,I,D,T,y,p,e);
1613 const XMLCh NameIDType::NAMEQUALIFIER_ATTRIB_NAME[] = UNICODE_LITERAL_13(N,a,m,e,Q,u,a,l,i,f,i,e,r);
1614 const XMLCh NameIDType::SPNAMEQUALIFIER_ATTRIB_NAME[] = UNICODE_LITERAL_15(S,P,N,a,m,e,Q,u,a,l,i,f,i,e,r);
1615 const XMLCh NameIDType::FORMAT_ATTRIB_NAME[] = UNICODE_LITERAL_6(F,o,r,m,a,t);
1616 const XMLCh NameIDType::SPPROVIDEDID_ATTRIB_NAME[] = UNICODE_LITERAL_12(S,P,P,r,o,v,i,d,e,d,I,D);
1617 const XMLCh OneTimeUse::LOCAL_NAME[] = UNICODE_LITERAL_10(O,n,e,T,i,m,e,U,s,e);
1618 const XMLCh OneTimeUse::TYPE_NAME[] = UNICODE_LITERAL_14(O,n,e,T,i,m,e,U,s,e,T,y,p,e);
1619 const XMLCh ProxyRestriction::LOCAL_NAME[] = UNICODE_LITERAL_16(P,r,o,x,y,R,e,s,t,r,i,c,t,i,o,n);
1620 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);
1621 const XMLCh ProxyRestriction::COUNT_ATTRIB_NAME[] = UNICODE_LITERAL_5(C,o,u,n,t);
1622 const XMLCh Statement::LOCAL_NAME[] = UNICODE_LITERAL_9(S,t,a,t,e,m,e,n,t);
1623 const XMLCh Subject::LOCAL_NAME[] = UNICODE_LITERAL_7(S,u,b,j,e,c,t);
1624 const XMLCh Subject::TYPE_NAME[] = UNICODE_LITERAL_11(S,u,b,j,e,c,t,T,y,p,e);
1625 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);
1626 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);
1627 const XMLCh SubjectConfirmation::METHOD_ATTRIB_NAME[] = UNICODE_LITERAL_6(M,e,t,h,o,d);
1628 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);
1629 const XMLCh SubjectConfirmationDataType::NOTBEFORE_ATTRIB_NAME[] = UNICODE_LITERAL_9(N,o,t,B,e,f,o,r,e);
1630 const XMLCh SubjectConfirmationDataType::NOTONORAFTER_ATTRIB_NAME[] = UNICODE_LITERAL_12(N,o,t,O,n,O,r,A,f,t,e,r);
1631 const XMLCh SubjectConfirmationDataType::INRESPONSETO_ATTRIB_NAME[] = UNICODE_LITERAL_12(I,n,R,e,s,p,o,n,s,e,T,o);
1632 const XMLCh SubjectConfirmationDataType::RECIPIENT_ATTRIB_NAME[] = UNICODE_LITERAL_9(R,e,c,i,p,i,e,n,t);
1633 const XMLCh SubjectConfirmationDataType::ADDRESS_ATTRIB_NAME[] = UNICODE_LITERAL_7(A,d,d,r,e,s,s);
1634 const XMLCh SubjectLocality::LOCAL_NAME[] = UNICODE_LITERAL_15(S,u,b,j,e,c,t,L,o,c,a,l,i,t,y);
1635 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);
1636 const XMLCh SubjectLocality::ADDRESS_ATTRIB_NAME[] =UNICODE_LITERAL_7(A,d,d,r,e,s,s);
1637 const XMLCh SubjectLocality::DNSNAME_ATTRIB_NAME[] =UNICODE_LITERAL_7(D,N,S,N,a,m,e);
1639 const XMLCh NameIDType::UNSPECIFIED[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified
1640 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1641 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1642 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1643 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1644 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1645 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
1648 const XMLCh NameIDType::EMAIL[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress
1649 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1650 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1651 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1652 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1653 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1654 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
1657 const XMLCh NameIDType::X509_SUBJECT[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName
1658 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1659 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1660 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1661 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1662 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1663 chLatin_X, chDigit_5, chDigit_0, chDigit_9, chLatin_S, chLatin_u, chLatin_b, chLatin_j, chLatin_e, chLatin_c, chLatin_t,
1664 chLatin_N, chLatin_a, chLatin_m, chLatin_e, chNull
1667 const XMLCh NameIDType::WIN_DOMAIN_QUALIFIED[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName
1668 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1669 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1670 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1671 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1672 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1673 chLatin_W, chLatin_i, chLatin_n, chLatin_d, chLatin_o, chLatin_w, chLatin_s,
1674 chLatin_D, chLatin_o, chLatin_m, chLatin_a, chLatin_i, chLatin_n,
1675 chLatin_Q, chLatin_u, chLatin_a, chLatin_l, chLatin_i, chLatin_f, chLatin_i, chLatin_e, chLatin_d,
1676 chLatin_N, chLatin_a, chLatin_m, chLatin_e, chNull
1679 const XMLCh NameIDType::KERBEROS[] = // urn:oasis:names:tc:SAML:2.0:nameid-format:kerberos
1680 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1681 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1682 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1683 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1684 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1685 chLatin_k, chLatin_e, chLatin_r, chLatin_b, chLatin_e, chLatin_r, chLatin_o, chLatin_s, chNull
1688 const XMLCh NameIDType::ENTITY[] = // urn:oasis:names:tc:SAML:2.0:nameid-format:entity
1689 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1690 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1691 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1692 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1693 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1694 chLatin_e, chLatin_n, chLatin_t, chLatin_i, chLatin_t, chLatin_y, chNull
1697 const XMLCh NameIDType::PERSISTENT[] = // urn:oasis:names:tc:SAML:2.0:nameid-format:persistent
1698 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1699 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1700 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1701 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1702 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1703 chLatin_p, chLatin_e, chLatin_r, chLatin_s, chLatin_i, chLatin_s, chLatin_t, chLatin_e, chLatin_n, chLatin_t, chNull
1706 const XMLCh NameIDType::TRANSIENT[] = // urn:oasis:names:tc:SAML:2.0:nameid-format:transient
1707 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1708 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1709 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1710 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1711 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1712 chLatin_t, chLatin_r, chLatin_a, chLatin_n, chLatin_s, chLatin_i, chLatin_e, chLatin_n, chLatin_t, chNull
1715 const XMLCh SubjectConfirmation::BEARER[] = // urn:oasis:names:tc:SAML:2.0:cm:bearer
1716 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1717 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1718 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1719 chLatin_c, chLatin_m, chColon, chLatin_b, chLatin_e, chLatin_a, chLatin_r, chLatin_e, chLatin_r, chNull
1722 const XMLCh SubjectConfirmation::HOLDER_KEY[] = // urn:oasis:names:tc:SAML:2.0:cm:holder-of-key
1723 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1724 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1725 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1726 chLatin_c, chLatin_m, chColon, chLatin_h, chLatin_o, chLatin_l, chLatin_d, chLatin_e, chLatin_r, chDash,
1727 chLatin_o, chLatin_f, chDash, chLatin_k, chLatin_e, chLatin_y, chNull
1730 const XMLCh SubjectConfirmation::SENDER_VOUCHES[] = // urn:oasis:names:tc:SAML:2.0:cm:sender-vouches
1731 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1732 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1733 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1734 chLatin_c, chLatin_m, chColon, chLatin_s, chLatin_e, chLatin_n, chLatin_d, chLatin_e, chLatin_r, chDash,
1735 chLatin_v, chLatin_o, chLatin_u, chLatin_c, chLatin_h, chLatin_e, chLatin_s, chNull
1738 const XMLCh Action::RWEDC_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:rwedc
1739 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1740 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1741 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1742 chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1743 chLatin_r, chLatin_w, chLatin_e, chLatin_d, chLatin_c, chNull
1746 const XMLCh Action::RWEDC_NEG_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:rwedc-negation
1747 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1748 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1749 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1750 chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1751 chLatin_r, chLatin_w, chLatin_e, chLatin_d, chLatin_c, chDash,
1752 chLatin_n, chLatin_e, chLatin_g, chLatin_a, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chNull
1755 const XMLCh Action::GHPP_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:ghpp
1756 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1757 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1758 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1759 chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1760 chLatin_g, chLatin_h, chLatin_p, chLatin_p, chNull
1763 const XMLCh Action::UNIX_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:unix
1764 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1765 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1766 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1767 chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1768 chLatin_u, chLatin_n, chLatin_i, chLatin_x, chNull
1771 const XMLCh Attribute::UNSPECIFIED[] = // urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified
1772 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1773 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1774 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1775 chLatin_a, chLatin_t, chLatin_t, chLatin_r, chLatin_n, chLatin_a, chLatin_m, chLatin_e, chDash,
1776 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1777 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
1780 const XMLCh Attribute::URI_REFERENCE[] = // urn:oasis:names:tc:SAML:2.0:attrname-format:uri
1781 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1782 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1783 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1784 chLatin_a, chLatin_t, chLatin_t, chLatin_r, chLatin_n, chLatin_a, chLatin_m, chLatin_e, chDash,
1785 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1786 chLatin_u, chLatin_r, chLatin_i, chNull
1789 const XMLCh Attribute::BASIC[] = // urn:oasis:names:tc:SAML:2.0:attrname-format:basic
1790 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1791 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1792 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1793 chLatin_a, chLatin_t, chLatin_t, chLatin_r, chLatin_n, chLatin_a, chLatin_m, chLatin_e, chDash,
1794 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1795 chLatin_b, chLatin_a, chLatin_s, chLatin_i, chLatin_c, chNull