2 * Licensed to the University Corporation for Advanced Internet
3 * Development, Inc. (UCAID) under one or more contributor license
4 * agreements. See the NOTICE file distributed with this work for
5 * additional information regarding copyright ownership.
7 * UCAID licenses this file to you under the Apache License,
8 * Version 2.0 (the "License"); you may not use this file except
9 * in compliance with the License. You may obtain a copy of the
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing,
15 * software distributed under the License is distributed on an
16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
17 * either express or implied. See the License for the specific
18 * language governing permissions and limitations under the License.
24 * Implementation classes for SAML 1.x Assertions schema.
28 #include "exceptions.h"
29 #include "saml1/core/Assertions.h"
30 #include "signature/ContentReference.h"
32 #include <xmltooling/AbstractComplexElement.h>
33 #include <xmltooling/AbstractSimpleElement.h>
34 #include <xmltooling/impl/AnyElement.h>
35 #include <xmltooling/io/AbstractXMLObjectMarshaller.h>
36 #include <xmltooling/io/AbstractXMLObjectUnmarshaller.h>
37 #include <xmltooling/signature/KeyInfo.h>
38 #include <xmltooling/signature/Signature.h>
39 #include <xmltooling/util/DateTime.h>
40 #include <xmltooling/util/XMLHelper.h>
44 #include <xercesc/util/XMLUniDefs.hpp>
46 using namespace opensaml::saml1;
47 using namespace xmlsignature;
48 using namespace xmltooling;
50 using xmlconstants::XMLSIG_NS;
51 using xmlconstants::XML_ONE;
52 using samlconstants::SAML1_NS;
54 #if defined (_MSC_VER)
55 #pragma warning( push )
56 #pragma warning( disable : 4250 4251 )
62 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AssertionIDReference);
63 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,Audience);
64 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,ConfirmationMethod);
66 class SAML_DLLLOCAL ConditionImpl : public virtual Condition, public AnyElementImpl
69 virtual ~ConditionImpl() {}
71 ConditionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
72 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
75 ConditionImpl(const ConditionImpl& src) : AbstractXMLObject(src), AnyElementImpl(src) {}
77 IMPL_XMLOBJECT_CLONE(Condition);
80 class SAML_DLLLOCAL AudienceRestrictionConditionImpl : public virtual AudienceRestrictionCondition,
81 public AbstractComplexElement,
82 public AbstractDOMCachingXMLObject,
83 public AbstractXMLObjectMarshaller,
84 public AbstractXMLObjectUnmarshaller
87 virtual ~AudienceRestrictionConditionImpl() {}
89 AudienceRestrictionConditionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
90 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
93 AudienceRestrictionConditionImpl(const AudienceRestrictionConditionImpl& src)
94 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
95 VectorOf(Audience) v=getAudiences();
96 for (vector<Audience*>::const_iterator i=src.m_Audiences.begin(); i!=src.m_Audiences.end(); i++) {
98 v.push_back((*i)->cloneAudience());
103 IMPL_XMLOBJECT_CLONE(AudienceRestrictionCondition);
104 Condition* cloneCondition() const {
105 return cloneAudienceRestrictionCondition();
107 IMPL_TYPED_CHILDREN(Audience,m_children.end());
110 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
111 PROC_TYPED_CHILDREN(Audience,SAML1_NS,false);
112 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
116 class SAML_DLLLOCAL DoNotCacheConditionImpl : public virtual DoNotCacheCondition,
117 public AbstractSimpleElement,
118 public AbstractDOMCachingXMLObject,
119 public AbstractXMLObjectMarshaller,
120 public AbstractXMLObjectUnmarshaller
123 virtual ~DoNotCacheConditionImpl() {}
125 DoNotCacheConditionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
126 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
129 DoNotCacheConditionImpl(const DoNotCacheConditionImpl& src)
130 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
133 IMPL_XMLOBJECT_CLONE(DoNotCacheCondition);
134 Condition* cloneCondition() const {
135 return cloneDoNotCacheCondition();
139 class SAML_DLLLOCAL ConditionsImpl : public virtual Conditions,
140 public AbstractComplexElement,
141 public AbstractDOMCachingXMLObject,
142 public AbstractXMLObjectMarshaller,
143 public AbstractXMLObjectUnmarshaller
146 virtual ~ConditionsImpl() {
148 delete m_NotOnOrAfter;
151 ConditionsImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
152 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
156 ConditionsImpl(const ConditionsImpl& src)
157 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
159 setNotBefore(src.getNotBefore());
160 setNotOnOrAfter(src.getNotOnOrAfter());
162 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
164 AudienceRestrictionCondition* arc=dynamic_cast<AudienceRestrictionCondition*>(*i);
166 getAudienceRestrictionConditions().push_back(arc->cloneAudienceRestrictionCondition());
170 DoNotCacheCondition* dncc=dynamic_cast<DoNotCacheCondition*>(*i);
172 getDoNotCacheConditions().push_back(dncc->cloneDoNotCacheCondition());
176 Condition* c=dynamic_cast<Condition*>(*i);
178 getConditions().push_back(c->cloneCondition());
186 m_NotBefore=m_NotOnOrAfter=nullptr;
189 IMPL_XMLOBJECT_CLONE(Conditions);
190 IMPL_DATETIME_ATTRIB(NotBefore,0);
191 IMPL_DATETIME_ATTRIB(NotOnOrAfter,SAMLTIME_MAX);
192 IMPL_TYPED_CHILDREN(AudienceRestrictionCondition, m_children.end());
193 IMPL_TYPED_CHILDREN(DoNotCacheCondition,m_children.end());
194 IMPL_TYPED_CHILDREN(Condition,m_children.end());
197 void marshallAttributes(DOMElement* domElement) const {
198 MARSHALL_DATETIME_ATTRIB(NotBefore,NOTBEFORE,nullptr);
199 MARSHALL_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,nullptr);
202 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
203 PROC_TYPED_CHILDREN(AudienceRestrictionCondition,SAML1_NS,true);
204 PROC_TYPED_CHILDREN(DoNotCacheCondition,SAML1_NS,true);
205 PROC_TYPED_CHILDREN(Condition,SAML1_NS,true);
206 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
209 void processAttribute(const DOMAttr* attribute) {
210 PROC_DATETIME_ATTRIB(NotBefore,NOTBEFORE,nullptr);
211 PROC_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,nullptr);
215 class SAML_DLLLOCAL NameIdentifierImpl : public virtual NameIdentifier,
216 public AbstractSimpleElement,
217 public AbstractDOMCachingXMLObject,
218 public AbstractXMLObjectMarshaller,
219 public AbstractXMLObjectUnmarshaller
222 virtual ~NameIdentifierImpl() {
223 XMLString::release(&m_Format);
224 XMLString::release(&m_NameQualifier);
227 NameIdentifierImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
228 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
232 NameIdentifierImpl(const NameIdentifierImpl& src)
233 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
235 setFormat(src.getFormat());
236 setNameQualifier(src.getNameQualifier());
240 m_Format=m_NameQualifier=nullptr;
243 IMPL_XMLOBJECT_CLONE(NameIdentifier);
244 IMPL_STRING_ATTRIB(Format);
245 IMPL_STRING_ATTRIB(NameQualifier);
248 void marshallAttributes(DOMElement* domElement) const {
249 MARSHALL_STRING_ATTRIB(Format,FORMAT,nullptr);
250 MARSHALL_STRING_ATTRIB(NameQualifier,NAMEQUALIFIER,nullptr);
253 void processAttribute(const DOMAttr* attribute) {
254 PROC_STRING_ATTRIB(Format,FORMAT,nullptr);
255 PROC_STRING_ATTRIB(NameQualifier,NAMEQUALIFIER,nullptr);
259 class SAML_DLLLOCAL SubjectConfirmationDataImpl : public virtual SubjectConfirmationData, public AnyElementImpl
262 virtual ~SubjectConfirmationDataImpl() {}
264 SubjectConfirmationDataImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
265 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
268 SubjectConfirmationDataImpl(const SubjectConfirmationDataImpl& src) : AbstractXMLObject(src), AnyElementImpl(src) {
271 IMPL_XMLOBJECT_CLONE(SubjectConfirmationData);
274 class SAML_DLLLOCAL SubjectConfirmationImpl : public virtual SubjectConfirmation,
275 public AbstractComplexElement,
276 public AbstractDOMCachingXMLObject,
277 public AbstractXMLObjectMarshaller,
278 public AbstractXMLObjectUnmarshaller
281 virtual ~SubjectConfirmationImpl() {}
283 SubjectConfirmationImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
284 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
288 SubjectConfirmationImpl(const SubjectConfirmationImpl& src)
289 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
291 if (src.getSubjectConfirmationData())
292 setSubjectConfirmationData(src.getSubjectConfirmationData()->clone());
293 if (src.getKeyInfo())
294 setKeyInfo(src.getKeyInfo()->cloneKeyInfo());
295 VectorOf(ConfirmationMethod) v=getConfirmationMethods();
296 for (vector<ConfirmationMethod*>::const_iterator i=src.m_ConfirmationMethods.begin(); i!=src.m_ConfirmationMethods.end(); i++) {
298 v.push_back((*i)->cloneConfirmationMethod());
304 m_SubjectConfirmationData=nullptr;
306 m_children.push_back(nullptr);
307 m_children.push_back(nullptr);
308 m_pos_SubjectConfirmationData=m_children.begin();
309 m_pos_KeyInfo=m_pos_SubjectConfirmationData;
313 IMPL_XMLOBJECT_CLONE(SubjectConfirmation);
314 IMPL_TYPED_CHILDREN(ConfirmationMethod,m_pos_SubjectConfirmationData);
315 IMPL_XMLOBJECT_CHILD(SubjectConfirmationData);
316 IMPL_TYPED_CHILD(KeyInfo);
319 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
320 PROC_TYPED_CHILDREN(ConfirmationMethod,SAML1_NS,false);
321 PROC_TYPED_CHILD(KeyInfo,XMLSIG_NS,false);
323 // Anything else we'll assume is the data.
324 if (getSubjectConfirmationData())
325 throw UnmarshallingException("Invalid child element: $1",params(1,childXMLObject->getElementQName().toString().c_str()));
326 setSubjectConfirmationData(childXMLObject);
330 class SAML_DLLLOCAL SubjectImpl : public virtual Subject,
331 public AbstractComplexElement,
332 public AbstractDOMCachingXMLObject,
333 public AbstractXMLObjectMarshaller,
334 public AbstractXMLObjectUnmarshaller
337 virtual ~SubjectImpl() {}
339 SubjectImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
340 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
344 SubjectImpl(const SubjectImpl& src)
345 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
347 if (src.getNameIdentifier())
348 setNameIdentifier(src.getNameIdentifier()->cloneNameIdentifier());
349 if (src.getSubjectConfirmation())
350 setSubjectConfirmation(src.getSubjectConfirmation()->cloneSubjectConfirmation());
354 m_NameIdentifier=nullptr;
355 m_SubjectConfirmation=nullptr;
356 m_children.push_back(nullptr);
357 m_children.push_back(nullptr);
358 m_pos_NameIdentifier=m_children.begin();
359 m_pos_SubjectConfirmation=m_pos_NameIdentifier;
360 ++m_pos_SubjectConfirmation;
363 IMPL_XMLOBJECT_CLONE(Subject);
364 IMPL_TYPED_CHILD(NameIdentifier);
365 IMPL_TYPED_CHILD(SubjectConfirmation);
368 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
369 PROC_TYPED_CHILD(NameIdentifier,SAML1_NS,true);
370 PROC_TYPED_CHILD(SubjectConfirmation,SAML1_NS,true);
371 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
375 class SAML_DLLLOCAL StatementImpl : public virtual Statement, public AnyElementImpl
378 virtual ~StatementImpl() {}
380 StatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
381 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
384 StatementImpl(const StatementImpl& src) : AbstractXMLObject(src), AnyElementImpl(src) {}
386 IMPL_XMLOBJECT_CLONE(Statement);
389 class SAML_DLLLOCAL SubjectStatementImpl : public virtual SubjectStatement,
390 public AbstractComplexElement,
391 public AbstractDOMCachingXMLObject,
392 public AbstractXMLObjectMarshaller,
393 public AbstractXMLObjectUnmarshaller
397 m_children.push_back(nullptr);
398 m_pos_Subject=m_children.begin();
401 SubjectStatementImpl() {
405 virtual ~SubjectStatementImpl() {}
407 SubjectStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
408 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
412 SubjectStatementImpl(const SubjectStatementImpl& src)
413 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
415 if (src.getSubject())
416 setSubject(src.getSubject()->cloneSubject());
419 IMPL_TYPED_CHILD(Subject);
422 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
423 PROC_TYPED_CHILD(Subject,SAML1_NS,true);
424 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
428 class SAML_DLLLOCAL SubjectLocalityImpl : public virtual SubjectLocality,
429 public AbstractSimpleElement,
430 public AbstractDOMCachingXMLObject,
431 public AbstractXMLObjectMarshaller,
432 public AbstractXMLObjectUnmarshaller
435 virtual ~SubjectLocalityImpl() {
436 XMLString::release(&m_IPAddress);
437 XMLString::release(&m_DNSAddress);
440 SubjectLocalityImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
441 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
445 SubjectLocalityImpl(const SubjectLocalityImpl& src)
446 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
448 setIPAddress(src.getIPAddress());
449 setDNSAddress(src.getDNSAddress());
453 m_IPAddress=m_DNSAddress=nullptr;
456 IMPL_XMLOBJECT_CLONE(SubjectLocality);
457 IMPL_STRING_ATTRIB(IPAddress);
458 IMPL_STRING_ATTRIB(DNSAddress);
461 void marshallAttributes(DOMElement* domElement) const {
462 MARSHALL_STRING_ATTRIB(IPAddress,IPADDRESS,nullptr);
463 MARSHALL_STRING_ATTRIB(DNSAddress,DNSADDRESS,nullptr);
466 void processAttribute(const DOMAttr* attribute) {
467 PROC_STRING_ATTRIB(IPAddress,IPADDRESS,nullptr);
468 PROC_STRING_ATTRIB(DNSAddress,DNSADDRESS,nullptr);
472 class SAML_DLLLOCAL AuthorityBindingImpl : public virtual AuthorityBinding,
473 public AbstractSimpleElement,
474 public AbstractDOMCachingXMLObject,
475 public AbstractXMLObjectMarshaller,
476 public AbstractXMLObjectUnmarshaller
479 virtual ~AuthorityBindingImpl() {
480 delete m_AuthorityKind;
481 XMLString::release(&m_Location);
482 XMLString::release(&m_Binding);
485 AuthorityBindingImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
486 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
490 AuthorityBindingImpl(const AuthorityBindingImpl& src)
491 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
493 setAuthorityKind(src.getAuthorityKind());
494 setLocation(src.getLocation());
495 setBinding(src.getBinding());
499 m_AuthorityKind=nullptr;
500 m_Location=m_Binding=nullptr;
503 IMPL_XMLOBJECT_CLONE(AuthorityBinding);
504 IMPL_XMLOBJECT_ATTRIB(AuthorityKind,xmltooling::QName);
505 IMPL_STRING_ATTRIB(Location);
506 IMPL_STRING_ATTRIB(Binding);
509 void marshallAttributes(DOMElement* domElement) const {
510 MARSHALL_QNAME_ATTRIB(AuthorityKind,AUTHORITYKIND,nullptr);
511 MARSHALL_STRING_ATTRIB(Location,LOCATION,nullptr);
512 MARSHALL_STRING_ATTRIB(Binding,BINDING,nullptr);
515 void processAttribute(const DOMAttr* attribute) {
516 PROC_QNAME_ATTRIB(AuthorityKind,AUTHORITYKIND,nullptr);
517 PROC_STRING_ATTRIB(Location,LOCATION,nullptr);
518 PROC_STRING_ATTRIB(Binding,BINDING,nullptr);
522 class SAML_DLLLOCAL AuthenticationStatementImpl : public virtual AuthenticationStatement, public SubjectStatementImpl
525 virtual ~AuthenticationStatementImpl() {
526 XMLString::release(&m_AuthenticationMethod);
527 delete m_AuthenticationInstant;
530 AuthenticationStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
531 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
535 AuthenticationStatementImpl(const AuthenticationStatementImpl& src) : AbstractXMLObject(src), SubjectStatementImpl(src) {
537 setAuthenticationMethod(src.getAuthenticationMethod());
538 setAuthenticationInstant(src.getAuthenticationInstant());
539 if (src.getSubjectLocality())
540 setSubjectLocality(src.getSubjectLocality()->cloneSubjectLocality());
541 VectorOf(AuthorityBinding) v=getAuthorityBindings();
542 for (vector<AuthorityBinding*>::const_iterator i=src.m_AuthorityBindings.begin(); i!=src.m_AuthorityBindings.end(); i++) {
544 v.push_back((*i)->cloneAuthorityBinding());
550 m_AuthenticationMethod=nullptr;
551 m_AuthenticationInstant=nullptr;
552 m_SubjectLocality=nullptr;
553 m_children.push_back(nullptr);
554 m_pos_SubjectLocality=m_pos_Subject;
555 ++m_pos_SubjectLocality;
558 IMPL_XMLOBJECT_CLONE(AuthenticationStatement);
559 SubjectStatement* cloneSubjectStatement() const {
560 return cloneAuthenticationStatement();
562 Statement* cloneStatement() const {
563 return cloneAuthenticationStatement();
565 IMPL_STRING_ATTRIB(AuthenticationMethod);
566 IMPL_DATETIME_ATTRIB(AuthenticationInstant,0);
567 IMPL_TYPED_CHILD(SubjectLocality);
568 IMPL_TYPED_CHILDREN(AuthorityBinding, m_children.end());
571 void marshallAttributes(DOMElement* domElement) const {
572 MARSHALL_STRING_ATTRIB(AuthenticationMethod,AUTHENTICATIONMETHOD,nullptr);
573 MARSHALL_DATETIME_ATTRIB(AuthenticationInstant,AUTHENTICATIONINSTANT,nullptr);
574 SubjectStatementImpl::marshallAttributes(domElement);
577 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
578 PROC_TYPED_CHILD(SubjectLocality,SAML1_NS,false);
579 PROC_TYPED_CHILDREN(AuthorityBinding,SAML1_NS,false);
580 SubjectStatementImpl::processChildElement(childXMLObject,root);
583 void processAttribute(const DOMAttr* attribute) {
584 PROC_STRING_ATTRIB(AuthenticationMethod,AUTHENTICATIONMETHOD,nullptr);
585 PROC_DATETIME_ATTRIB(AuthenticationInstant,AUTHENTICATIONINSTANT,nullptr);
586 SubjectStatementImpl::processAttribute(attribute);
590 class SAML_DLLLOCAL ActionImpl : public virtual Action,
591 public AbstractSimpleElement,
592 public AbstractDOMCachingXMLObject,
593 public AbstractXMLObjectMarshaller,
594 public AbstractXMLObjectUnmarshaller
597 virtual ~ActionImpl() {
598 XMLString::release(&m_Namespace);
601 ActionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
602 : AbstractXMLObject(nsURI, localName, prefix, schemaType), m_Namespace(nullptr) {
605 ActionImpl(const ActionImpl& src) : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
606 setNamespace(src.getNamespace());
609 IMPL_XMLOBJECT_CLONE(Action);
610 IMPL_STRING_ATTRIB(Namespace);
613 void marshallAttributes(DOMElement* domElement) const {
614 MARSHALL_STRING_ATTRIB(Namespace,NAMESPACE,nullptr);
617 void processAttribute(const DOMAttr* attribute) {
618 PROC_STRING_ATTRIB(Namespace,NAMESPACE,nullptr);
622 class SAML_DLLLOCAL EvidenceImpl : public virtual Evidence,
623 public AbstractComplexElement,
624 public AbstractDOMCachingXMLObject,
625 public AbstractXMLObjectMarshaller,
626 public AbstractXMLObjectUnmarshaller
629 virtual ~EvidenceImpl() {}
631 EvidenceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
632 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
635 EvidenceImpl(const EvidenceImpl& src)
636 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
637 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
639 AssertionIDReference* ref=dynamic_cast<AssertionIDReference*>(*i);
641 getAssertionIDReferences().push_back(ref->cloneAssertionIDReference());
645 Assertion* assertion=dynamic_cast<Assertion*>(*i);
647 getAssertions().push_back(assertion->cloneAssertion());
654 IMPL_XMLOBJECT_CLONE(Evidence);
655 IMPL_TYPED_CHILDREN(AssertionIDReference,m_children.end());
656 IMPL_TYPED_CHILDREN(Assertion,m_children.end());
659 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
660 PROC_TYPED_CHILDREN(AssertionIDReference,SAML1_NS,false);
661 PROC_TYPED_CHILDREN(Assertion,SAML1_NS,true);
662 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
666 class SAML_DLLLOCAL AuthorizationDecisionStatementImpl
667 : public virtual AuthorizationDecisionStatement, public SubjectStatementImpl
670 virtual ~AuthorizationDecisionStatementImpl() {
671 XMLString::release(&m_Resource);
672 XMLString::release(&m_Decision);
675 AuthorizationDecisionStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
676 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
680 AuthorizationDecisionStatementImpl(const AuthorizationDecisionStatementImpl& src)
681 : AbstractXMLObject(src), SubjectStatementImpl(src) {
683 setResource(src.getResource());
684 setDecision(src.getDecision());
685 if (src.getEvidence())
686 setEvidence(src.getEvidence()->cloneEvidence());
687 VectorOf(Action) v=getActions();
688 for (vector<Action*>::const_iterator i=src.m_Actions.begin(); i!=src.m_Actions.end(); i++) {
690 v.push_back((*i)->cloneAction());
699 m_children.push_back(nullptr);
700 m_pos_Evidence=m_pos_Subject;
704 IMPL_XMLOBJECT_CLONE(AuthorizationDecisionStatement);
705 SubjectStatement* cloneSubjectStatement() const {
706 return cloneAuthorizationDecisionStatement();
708 Statement* cloneStatement() const {
709 return cloneAuthorizationDecisionStatement();
711 IMPL_STRING_ATTRIB(Resource);
712 IMPL_STRING_ATTRIB(Decision);
713 IMPL_TYPED_CHILD(Evidence);
714 IMPL_TYPED_CHILDREN(Action, m_pos_Evidence);
717 void marshallAttributes(DOMElement* domElement) const {
718 MARSHALL_STRING_ATTRIB(Resource,RESOURCE,nullptr);
719 MARSHALL_STRING_ATTRIB(Decision,DECISION,nullptr);
720 SubjectStatementImpl::marshallAttributes(domElement);
723 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
724 PROC_TYPED_CHILD(Evidence,SAML1_NS,false);
725 PROC_TYPED_CHILDREN(Action,SAML1_NS,false);
726 SubjectStatementImpl::processChildElement(childXMLObject,root);
729 void processAttribute(const DOMAttr* attribute) {
730 PROC_STRING_ATTRIB(Resource,RESOURCE,nullptr);
731 PROC_STRING_ATTRIB(Decision,DECISION,nullptr);
732 SubjectStatementImpl::processAttribute(attribute);
736 class SAML_DLLLOCAL AttributeDesignatorImpl : public virtual AttributeDesignator,
737 public AbstractSimpleElement,
738 public AbstractDOMCachingXMLObject,
739 public AbstractXMLObjectMarshaller,
740 public AbstractXMLObjectUnmarshaller
743 virtual ~AttributeDesignatorImpl() {
744 XMLString::release(&m_AttributeName);
745 XMLString::release(&m_AttributeNamespace);
748 AttributeDesignatorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
749 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
753 AttributeDesignatorImpl(const AttributeDesignatorImpl& src)
754 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
756 setAttributeName(src.getAttributeName());
757 setAttributeNamespace(src.getAttributeNamespace());
761 m_AttributeName=m_AttributeNamespace=nullptr;
764 IMPL_XMLOBJECT_CLONE(AttributeDesignator);
765 IMPL_STRING_ATTRIB(AttributeName);
766 IMPL_STRING_ATTRIB(AttributeNamespace);
769 void marshallAttributes(DOMElement* domElement) const {
770 MARSHALL_STRING_ATTRIB(AttributeName,ATTRIBUTENAME,nullptr);
771 MARSHALL_STRING_ATTRIB(AttributeNamespace,ATTRIBUTENAMESPACE,nullptr);
774 void processAttribute(const DOMAttr* attribute) {
775 PROC_STRING_ATTRIB(AttributeName,ATTRIBUTENAME,nullptr);
776 PROC_STRING_ATTRIB(AttributeNamespace,ATTRIBUTENAMESPACE,nullptr);
780 class SAML_DLLLOCAL AttributeImpl : public virtual Attribute,
781 public AbstractComplexElement,
782 public AbstractDOMCachingXMLObject,
783 public AbstractXMLObjectMarshaller,
784 public AbstractXMLObjectUnmarshaller
787 virtual ~AttributeImpl() {
788 XMLString::release(&m_AttributeName);
789 XMLString::release(&m_AttributeNamespace);
792 AttributeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
793 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
797 AttributeImpl(const AttributeImpl& src)
798 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
800 setAttributeName(src.getAttributeName());
801 setAttributeNamespace(src.getAttributeNamespace());
802 VectorOf(XMLObject) v=getAttributeValues();
803 for (vector<XMLObject*>::const_iterator i=src.m_AttributeValues.begin(); i!=src.m_AttributeValues.end(); i++) {
805 v.push_back((*i)->clone());
811 m_AttributeName=m_AttributeNamespace=nullptr;
814 IMPL_XMLOBJECT_CLONE(Attribute);
815 AttributeDesignator* cloneAttributeDesignator() const {
816 return cloneAttribute();
818 IMPL_STRING_ATTRIB(AttributeName);
819 IMPL_STRING_ATTRIB(AttributeNamespace);
820 IMPL_XMLOBJECT_CHILDREN(AttributeValue,m_children.end());
823 void marshallAttributes(DOMElement* domElement) const {
824 MARSHALL_STRING_ATTRIB(AttributeName,ATTRIBUTENAME,nullptr);
825 MARSHALL_STRING_ATTRIB(AttributeNamespace,ATTRIBUTENAMESPACE,nullptr);
828 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
829 getAttributeValues().push_back(childXMLObject);
832 void processAttribute(const DOMAttr* attribute) {
833 PROC_STRING_ATTRIB(AttributeName,ATTRIBUTENAME,nullptr);
834 PROC_STRING_ATTRIB(AttributeNamespace,ATTRIBUTENAMESPACE,nullptr);
838 class SAML_DLLLOCAL AttributeValueImpl : public virtual AttributeValue, public AnyElementImpl
841 virtual ~AttributeValueImpl() {}
843 AttributeValueImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
844 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
847 AttributeValueImpl(const AttributeValueImpl& src) : AbstractXMLObject(src), AnyElementImpl(src) {}
849 IMPL_XMLOBJECT_CLONE(AttributeValue);
852 class SAML_DLLLOCAL AttributeStatementImpl : public virtual AttributeStatement, public SubjectStatementImpl
855 virtual ~AttributeStatementImpl() {}
857 AttributeStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
858 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
861 AttributeStatementImpl(const AttributeStatementImpl& src)
862 : AbstractXMLObject(src), SubjectStatementImpl(src) {
863 VectorOf(Attribute) v=getAttributes();
864 for (vector<Attribute*>::const_iterator i=src.m_Attributes.begin(); i!=src.m_Attributes.end(); i++) {
866 v.push_back((*i)->cloneAttribute());
871 IMPL_XMLOBJECT_CLONE(AttributeStatement);
872 SubjectStatement* cloneSubjectStatement() const {
873 return cloneAttributeStatement();
875 Statement* cloneStatement() const {
876 return cloneAttributeStatement();
878 IMPL_TYPED_CHILDREN(Attribute, m_children.end());
881 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
882 PROC_TYPED_CHILDREN(Attribute,SAML1_NS,true);
883 SubjectStatementImpl::processChildElement(childXMLObject,root);
887 class SAML_DLLLOCAL AdviceImpl : public virtual Advice,
888 public AbstractComplexElement,
889 public AbstractDOMCachingXMLObject,
890 public AbstractXMLObjectMarshaller,
891 public AbstractXMLObjectUnmarshaller
894 virtual ~AdviceImpl() {}
896 AdviceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
897 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
900 AdviceImpl(const AdviceImpl& src)
901 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
902 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
904 AssertionIDReference* ref=dynamic_cast<AssertionIDReference*>(*i);
906 getAssertionIDReferences().push_back(ref->cloneAssertionIDReference());
910 Assertion* assertion=dynamic_cast<Assertion*>(*i);
912 getAssertions().push_back(assertion->cloneAssertion());
916 getUnknownXMLObjects().push_back((*i)->clone());
921 IMPL_XMLOBJECT_CLONE(Advice);
922 IMPL_TYPED_CHILDREN(AssertionIDReference,m_children.end());
923 IMPL_TYPED_CHILDREN(Assertion,m_children.end());
924 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
927 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
928 PROC_TYPED_CHILDREN(AssertionIDReference,SAML1_NS,false);
929 PROC_TYPED_CHILDREN(Assertion,SAML1_NS,true);
932 const XMLCh* nsURI=root->getNamespaceURI();
933 if (!XMLString::equals(nsURI,SAML1_NS) && nsURI && *nsURI) {
934 getUnknownXMLObjects().push_back(childXMLObject);
938 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
942 class SAML_DLLLOCAL AssertionImpl : public virtual Assertion,
943 public AbstractComplexElement,
944 public AbstractDOMCachingXMLObject,
945 public AbstractXMLObjectMarshaller,
946 public AbstractXMLObjectUnmarshaller
949 m_MinorVersion=nullptr;
950 m_AssertionID=nullptr;
952 m_IssueInstant=nullptr;
953 m_children.push_back(nullptr);
954 m_children.push_back(nullptr);
955 m_children.push_back(nullptr);
956 m_Conditions=nullptr;
959 m_pos_Conditions=m_children.begin();
960 m_pos_Advice=m_pos_Conditions;
962 m_pos_Signature=m_pos_Advice;
966 virtual ~AssertionImpl() {
967 XMLString::release(&m_MinorVersion);
968 XMLString::release(&m_AssertionID);
969 XMLString::release(&m_Issuer);
970 delete m_IssueInstant;
973 AssertionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
974 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
978 AssertionImpl(const AssertionImpl& src)
979 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
981 setMinorVersion(src.m_MinorVersion);
982 setAssertionID(src.getAssertionID());
983 setIssuer(src.getIssuer());
984 setIssueInstant(src.getIssueInstant());
985 if (src.getConditions())
986 setConditions(src.getConditions()->cloneConditions());
988 setAdvice(src.getAdvice()->cloneAdvice());
989 if (src.getSignature())
990 setSignature(src.getSignature()->cloneSignature());
991 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
993 AuthenticationStatement* authst=dynamic_cast<AuthenticationStatement*>(*i);
995 getAuthenticationStatements().push_back(authst->cloneAuthenticationStatement());
999 AttributeStatement* attst=dynamic_cast<AttributeStatement*>(*i);
1001 getAttributeStatements().push_back(attst->cloneAttributeStatement());
1005 AuthorizationDecisionStatement* authzst=dynamic_cast<AuthorizationDecisionStatement*>(*i);
1007 getAuthorizationDecisionStatements().push_back(authzst->cloneAuthorizationDecisionStatement());
1011 SubjectStatement* subst=dynamic_cast<SubjectStatement*>(*i);
1013 getSubjectStatements().push_back(subst->cloneSubjectStatement());
1017 Statement* st=dynamic_cast<Statement*>(*i);
1019 getStatements().push_back(st->cloneStatement());
1026 //IMPL_TYPED_CHILD(Signature);
1027 // Need customized setter.
1029 Signature* m_Signature;
1030 list<XMLObject*>::iterator m_pos_Signature;
1032 Signature* getSignature() const {
1036 void setSignature(Signature* sig) {
1037 prepareForAssignment(m_Signature,sig);
1038 *m_pos_Signature=m_Signature=sig;
1039 // Sync content reference back up.
1041 m_Signature->setContentReference(new opensaml::ContentReference(*this));
1044 IMPL_XMLOBJECT_CLONE(Assertion);
1045 IMPL_INTEGER_ATTRIB(MinorVersion);
1046 IMPL_STRING_ATTRIB(AssertionID); // have to special-case getXMLID
1047 const XMLCh* getXMLID() const {
1048 pair<bool,int> v = getMinorVersion();
1049 return (!v.first || v.second > 0) ? m_AssertionID : nullptr;
1051 const XMLCh* getID() const {
1052 return getAssertionID();
1054 void releaseDOM() const {
1056 getDOM()->removeAttributeNS(nullptr, ASSERTIONID_ATTRIB_NAME);
1057 AbstractDOMCachingXMLObject::releaseDOM();
1059 IMPL_STRING_ATTRIB(Issuer);
1060 IMPL_DATETIME_ATTRIB(IssueInstant,0);
1061 IMPL_TYPED_CHILD(Conditions);
1062 IMPL_TYPED_CHILD(Advice);
1063 IMPL_TYPED_CHILDREN(Statement, m_pos_Signature);
1064 IMPL_TYPED_CHILDREN(SubjectStatement, m_pos_Signature);
1065 IMPL_TYPED_CHILDREN(AuthenticationStatement, m_pos_Signature);
1066 IMPL_TYPED_CHILDREN(AttributeStatement, m_pos_Signature);
1067 IMPL_TYPED_CHILDREN(AuthorizationDecisionStatement, m_pos_Signature);
1070 void prepareForMarshalling() const {
1072 declareNonVisibleNamespaces();
1075 void marshallAttributes(DOMElement* domElement) const {
1076 static const XMLCh MAJORVERSION[] = UNICODE_LITERAL_12(M,a,j,o,r,V,e,r,s,i,o,n);
1077 domElement->setAttributeNS(nullptr,MAJORVERSION,XML_ONE);
1078 if (!m_MinorVersion)
1079 const_cast<AssertionImpl*>(this)->m_MinorVersion=XMLString::replicate(XML_ONE);
1080 MARSHALL_INTEGER_ATTRIB(MinorVersion,MINORVERSION,nullptr);
1082 const_cast<AssertionImpl*>(this)->m_AssertionID=SAMLConfig::getConfig().generateIdentifier();
1083 domElement->setAttributeNS(nullptr, ASSERTIONID_ATTRIB_NAME, m_AssertionID);
1084 if (*m_MinorVersion!=chDigit_0) {
1085 #ifdef XMLTOOLING_XERCESC_BOOLSETIDATTRIBUTE
1086 domElement->setIdAttributeNS(nullptr, ASSERTIONID_ATTRIB_NAME, true);
1088 domElement->setIdAttributeNS(nullptr, ASSERTIONID_ATTRIB_NAME);
1091 MARSHALL_STRING_ATTRIB(Issuer,ISSUER,nullptr);
1092 if (!m_IssueInstant) {
1093 const_cast<AssertionImpl*>(this)->m_IssueInstantEpoch=time(nullptr);
1094 const_cast<AssertionImpl*>(this)->m_IssueInstant=new DateTime(m_IssueInstantEpoch);
1096 MARSHALL_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,nullptr);
1099 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1100 PROC_TYPED_CHILD(Conditions,SAML1_NS,false);
1101 PROC_TYPED_CHILD(Advice,SAML1_NS,false);
1102 PROC_TYPED_CHILD(Signature,XMLSIG_NS,false);
1103 PROC_TYPED_CHILDREN(AuthenticationStatement,SAML1_NS,false);
1104 PROC_TYPED_CHILDREN(AttributeStatement,SAML1_NS,false);
1105 PROC_TYPED_CHILDREN(AuthorizationDecisionStatement,SAML1_NS,false);
1106 PROC_TYPED_CHILDREN(SubjectStatement,SAML1_NS,true);
1107 PROC_TYPED_CHILDREN(Statement,SAML1_NS,true);
1108 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1111 void unmarshallAttributes(const DOMElement* domElement) {
1112 // Standard processing, but then we check IDness.
1113 AbstractXMLObjectUnmarshaller::unmarshallAttributes(domElement);
1114 if (m_AssertionID && (!m_MinorVersion || *m_MinorVersion!=chDigit_0)) {
1115 #ifdef XMLTOOLING_XERCESC_BOOLSETIDATTRIBUTE
1116 const_cast<DOMElement*>(domElement)->setIdAttributeNS(nullptr, ASSERTIONID_ATTRIB_NAME, true);
1118 const_cast<DOMElement*>(domElement)->setIdAttributeNS(nullptr, ASSERTIONID_ATTRIB_NAME);
1123 void processAttribute(const DOMAttr* attribute) {
1124 static const XMLCh MAJORVERSION[] = UNICODE_LITERAL_12(M,a,j,o,r,V,e,r,s,i,o,n);
1125 if (XMLHelper::isNodeNamed(attribute,nullptr,MAJORVERSION)) {
1126 if (!XMLString::equals(attribute->getValue(),XML_ONE))
1127 throw UnmarshallingException("Assertion has invalid major version.");
1129 PROC_INTEGER_ATTRIB(MinorVersion,MINORVERSION,nullptr);
1130 PROC_STRING_ATTRIB(AssertionID,ASSERTIONID,nullptr);
1131 PROC_STRING_ATTRIB(Issuer,ISSUER,nullptr);
1132 PROC_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,nullptr);
1139 #if defined (_MSC_VER)
1140 #pragma warning( pop )
1143 // Builder Implementations
1145 IMPL_XMLOBJECTBUILDER(Action);
1146 IMPL_XMLOBJECTBUILDER(Advice);
1147 IMPL_XMLOBJECTBUILDER(Assertion);
1148 IMPL_XMLOBJECTBUILDER(AssertionIDReference);
1149 IMPL_XMLOBJECTBUILDER(Attribute);
1150 IMPL_XMLOBJECTBUILDER(AttributeDesignator);
1151 IMPL_XMLOBJECTBUILDER(AttributeStatement);
1152 IMPL_XMLOBJECTBUILDER(AttributeValue);
1153 IMPL_XMLOBJECTBUILDER(Audience);
1154 IMPL_XMLOBJECTBUILDER(AudienceRestrictionCondition);
1155 IMPL_XMLOBJECTBUILDER(AuthenticationStatement);
1156 IMPL_XMLOBJECTBUILDER(AuthorizationDecisionStatement);
1157 IMPL_XMLOBJECTBUILDER(AuthorityBinding);
1158 IMPL_XMLOBJECTBUILDER(Condition);
1159 IMPL_XMLOBJECTBUILDER(Conditions);
1160 IMPL_XMLOBJECTBUILDER(ConfirmationMethod);
1161 IMPL_XMLOBJECTBUILDER(DoNotCacheCondition);
1162 IMPL_XMLOBJECTBUILDER(Evidence);
1163 IMPL_XMLOBJECTBUILDER(NameIdentifier);
1164 IMPL_XMLOBJECTBUILDER(Statement);
1165 IMPL_XMLOBJECTBUILDER(Subject);
1166 IMPL_XMLOBJECTBUILDER(SubjectConfirmation);
1167 IMPL_XMLOBJECTBUILDER(SubjectConfirmationData);
1168 IMPL_XMLOBJECTBUILDER(SubjectLocality);
1171 const XMLCh Action::LOCAL_NAME[] = UNICODE_LITERAL_6(A,c,t,i,o,n);
1172 const XMLCh Action::TYPE_NAME[] = UNICODE_LITERAL_10(A,c,t,i,o,n,T,y,p,e);
1173 const XMLCh Action::NAMESPACE_ATTRIB_NAME[] = UNICODE_LITERAL_9(N,a,m,e,s,p,a,c,e);
1174 const XMLCh Advice::LOCAL_NAME[] = UNICODE_LITERAL_6(A,d,v,i,c,e);
1175 const XMLCh Advice::TYPE_NAME[] = UNICODE_LITERAL_10(A,d,v,i,c,e,T,y,p,e);
1176 const XMLCh Assertion::LOCAL_NAME[] = UNICODE_LITERAL_9(A,s,s,e,r,t,i,o,n);
1177 const XMLCh Assertion::TYPE_NAME[] = UNICODE_LITERAL_13(A,s,s,e,r,t,i,o,n,T,y,p,e);
1178 const XMLCh Assertion::MINORVERSION_ATTRIB_NAME[] = UNICODE_LITERAL_12(M,i,n,o,r,V,e,r,s,i,o,n);
1179 const XMLCh Assertion::ASSERTIONID_ATTRIB_NAME[] = UNICODE_LITERAL_11(A,s,s,e,r,t,i,o,n,I,D);
1180 const XMLCh Assertion::ISSUER_ATTRIB_NAME[] = UNICODE_LITERAL_6(I,s,s,u,e,r);
1181 const XMLCh Assertion::ISSUEINSTANT_ATTRIB_NAME[] = UNICODE_LITERAL_12(I,s,s,u,e,I,n,s,t,a,n,t);
1182 const XMLCh AssertionIDReference::LOCAL_NAME[] = UNICODE_LITERAL_20(A,s,s,e,r,t,i,o,n,I,D,R,e,f,e,r,e,n,c,e);
1183 const XMLCh Attribute::LOCAL_NAME[] = UNICODE_LITERAL_9(A,t,t,r,i,b,u,t,e);
1184 const XMLCh Attribute::TYPE_NAME[] = UNICODE_LITERAL_13(A,t,t,r,i,b,u,t,e,T,y,p,e);
1185 const XMLCh AttributeDesignator::LOCAL_NAME[] = UNICODE_LITERAL_19(A,t,t,r,i,b,u,t,e,D,e,s,i,g,n,a,t,o,r);
1186 const XMLCh AttributeDesignator::TYPE_NAME[] = UNICODE_LITERAL_23(A,t,t,r,i,b,u,t,e,D,e,s,i,g,n,a,t,o,r,T,y,p,e);
1187 const XMLCh AttributeDesignator::ATTRIBUTENAME_ATTRIB_NAME[] = UNICODE_LITERAL_13(A,t,t,r,i,b,u,t,e,N,a,m,e);
1188 const XMLCh AttributeDesignator::ATTRIBUTENAMESPACE_ATTRIB_NAME[] = UNICODE_LITERAL_18(A,t,t,r,i,b,u,t,e,N,a,m,e,s,p,a,c,e);
1189 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);
1190 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);
1191 const XMLCh AttributeValue::LOCAL_NAME[] = UNICODE_LITERAL_14(A,t,t,r,i,b,u,t,e,V,a,l,u,e);
1192 const XMLCh Audience::LOCAL_NAME[] = UNICODE_LITERAL_8(A,u,d,i,e,n,c,e);
1193 const XMLCh AudienceRestrictionCondition::LOCAL_NAME[] = UNICODE_LITERAL_28(A,u,d,i,e,n,c,e,R,e,s,t,r,i,c,t,i,o,n,C,o,n,d,i,t,i,o,n);
1194 const XMLCh AudienceRestrictionCondition::TYPE_NAME[] = UNICODE_LITERAL_32(A,u,d,i,e,n,c,e,R,e,s,t,r,i,c,t,i,o,n,C,o,n,d,i,t,i,o,n,T,y,p,e);
1195 const XMLCh AuthenticationStatement::LOCAL_NAME[] = UNICODE_LITERAL_23(A,u,t,h,e,n,t,i,c,a,t,i,o,n,S,t,a,t,e,m,e,n,t);
1196 const XMLCh AuthenticationStatement::TYPE_NAME[] = UNICODE_LITERAL_27(A,u,t,h,e,n,t,i,c,a,t,i,o,n,S,t,a,t,e,m,e,n,t,T,y,p,e);
1197 const XMLCh AuthenticationStatement::AUTHENTICATIONMETHOD_ATTRIB_NAME[] = UNICODE_LITERAL_20(A,u,t,h,e,n,t,i,c,a,t,i,o,n,M,e,t,h,o,d);
1198 const XMLCh AuthenticationStatement::AUTHENTICATIONINSTANT_ATTRIB_NAME[] = UNICODE_LITERAL_21(A,u,t,h,e,n,t,i,c,a,t,i,o,n,I,n,s,t,a,n,t);
1199 const XMLCh AuthorityBinding::LOCAL_NAME[] = UNICODE_LITERAL_16(A,u,t,h,o,r,i,t,y,B,i,n,d,i,n,g);
1200 const XMLCh AuthorityBinding::TYPE_NAME[] = UNICODE_LITERAL_20(A,u,t,h,o,r,i,t,y,B,i,n,d,i,n,g,T,y,p,e);
1201 const XMLCh AuthorityBinding::AUTHORITYKIND_ATTRIB_NAME[] = UNICODE_LITERAL_13(A,u,t,h,o,r,i,t,y,K,i,n,d);
1202 const XMLCh AuthorityBinding::LOCATION_ATTRIB_NAME[] = UNICODE_LITERAL_8(L,o,c,a,t,i,o,n);
1203 const XMLCh AuthorityBinding::BINDING_ATTRIB_NAME[] = UNICODE_LITERAL_7(B,i,n,d,i,n,g);
1204 const XMLCh AuthorizationDecisionStatement::LOCAL_NAME[] = UNICODE_LITERAL_30(A,u,t,h,o,r,i,z,a,t,i,o,n,D,e,c,i,s,i,o,n,S,t,a,t,e,m,e,n,t);
1205 const XMLCh AuthorizationDecisionStatement::TYPE_NAME[] = UNICODE_LITERAL_34(A,u,t,h,o,r,i,z,a,t,i,o,n,D,e,c,i,s,i,o,n,S,t,a,t,e,m,e,n,t,T,y,p,e);
1206 const XMLCh AuthorizationDecisionStatement::RESOURCE_ATTRIB_NAME[] = UNICODE_LITERAL_8(R,e,s,o,u,r,c,e);
1207 const XMLCh AuthorizationDecisionStatement::DECISION_ATTRIB_NAME[] = UNICODE_LITERAL_8(D,e,c,i,s,i,o,n);
1208 const XMLCh AuthorizationDecisionStatement::DECISION_PERMIT[] = UNICODE_LITERAL_6(P,e,r,m,i,t);
1209 const XMLCh AuthorizationDecisionStatement::DECISION_DENY[] = UNICODE_LITERAL_4(D,e,n,y);
1210 const XMLCh AuthorizationDecisionStatement::DECISION_INDETERMINATE[] = UNICODE_LITERAL_13(I,n,d,e,t,e,r,m,i,n,a,t,e);
1211 const XMLCh Condition::LOCAL_NAME[] = UNICODE_LITERAL_9(C,o,n,d,i,t,i,o,n);
1212 const XMLCh Conditions::LOCAL_NAME[] = UNICODE_LITERAL_10(C,o,n,d,i,t,i,o,n,s);
1213 const XMLCh Conditions::TYPE_NAME[] = UNICODE_LITERAL_14(C,o,n,d,i,t,i,o,n,s,T,y,p,e);
1214 const XMLCh Conditions::NOTBEFORE_ATTRIB_NAME[] = UNICODE_LITERAL_9(N,o,t,B,e,f,o,r,e);
1215 const XMLCh Conditions::NOTONORAFTER_ATTRIB_NAME[] =UNICODE_LITERAL_12(N,o,t,O,n,O,r,A,f,t,e,r);
1216 const XMLCh ConfirmationMethod::LOCAL_NAME[] = UNICODE_LITERAL_18(C,o,n,f,i,r,m,a,t,i,o,n,M,e,t,h,o,d);
1217 const XMLCh DoNotCacheCondition::LOCAL_NAME[] = UNICODE_LITERAL_19(D,o,N,o,t,C,a,c,h,e,C,o,n,d,i,t,i,o,n);
1218 const XMLCh DoNotCacheCondition::TYPE_NAME[] = UNICODE_LITERAL_23(D,o,N,o,t,C,a,c,h,e,C,o,n,d,i,t,i,o,n,T,y,p,e);
1219 const XMLCh Evidence::LOCAL_NAME[] = UNICODE_LITERAL_8(E,v,i,d,e,n,c,e);
1220 const XMLCh Evidence::TYPE_NAME[] = UNICODE_LITERAL_12(E,v,i,d,e,n,c,e,T,y,p,e);
1221 const XMLCh NameIdentifier::LOCAL_NAME[] = UNICODE_LITERAL_14(N,a,m,e,I,d,e,n,t,i,f,i,e,r);
1222 const XMLCh NameIdentifier::TYPE_NAME[] = UNICODE_LITERAL_18(N,a,m,e,I,d,e,n,t,i,f,i,e,r,T,y,p,e);
1223 const XMLCh NameIdentifier::NAMEQUALIFIER_ATTRIB_NAME[] = UNICODE_LITERAL_13(N,a,m,e,Q,u,a,l,i,f,i,e,r);
1224 const XMLCh NameIdentifier::FORMAT_ATTRIB_NAME[] = UNICODE_LITERAL_6(F,o,r,m,a,t);
1225 const XMLCh Statement::LOCAL_NAME[] = UNICODE_LITERAL_9(S,t,a,t,e,m,e,n,t);
1226 const XMLCh Subject::LOCAL_NAME[] = UNICODE_LITERAL_7(S,u,b,j,e,c,t);
1227 const XMLCh Subject::TYPE_NAME[] = UNICODE_LITERAL_11(S,u,b,j,e,c,t,T,y,p,e);
1228 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);
1229 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);
1230 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);
1231 const XMLCh SubjectLocality::LOCAL_NAME[] = UNICODE_LITERAL_15(S,u,b,j,e,c,t,L,o,c,a,l,i,t,y);
1232 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);
1233 const XMLCh SubjectLocality::IPADDRESS_ATTRIB_NAME[] = UNICODE_LITERAL_9(I,P,A,d,d,r,e,s,s);
1234 const XMLCh SubjectLocality::DNSADDRESS_ATTRIB_NAME[] = UNICODE_LITERAL_10(D,N,S,A,d,d,r,e,s,s);
1235 const XMLCh SubjectStatement::LOCAL_NAME[] = UNICODE_LITERAL_16(S,u,b,j,e,c,t,S,t,a,t,e,m,e,n,t);
1237 const XMLCh NameIdentifier::UNSPECIFIED[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified
1238 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1239 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1240 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1241 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1242 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1243 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
1246 const XMLCh NameIdentifier::EMAIL[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress
1247 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1248 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1249 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1250 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1251 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1252 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
1255 const XMLCh NameIdentifier::X509_SUBJECT[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName
1256 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1257 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1258 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1259 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1260 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1261 chLatin_X, chDigit_5, chDigit_0, chDigit_9, chLatin_S, chLatin_u, chLatin_b, chLatin_j, chLatin_e, chLatin_c, chLatin_t,
1262 chLatin_N, chLatin_a, chLatin_m, chLatin_e, chNull
1265 const XMLCh NameIdentifier::WIN_DOMAIN_QUALIFIED[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName
1266 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1267 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1268 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1269 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1270 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1271 chLatin_W, chLatin_i, chLatin_n, chLatin_d, chLatin_o, chLatin_w, chLatin_s,
1272 chLatin_D, chLatin_o, chLatin_m, chLatin_a, chLatin_i, chLatin_n,
1273 chLatin_Q, chLatin_u, chLatin_a, chLatin_l, chLatin_i, chLatin_f, chLatin_i, chLatin_e, chLatin_d,
1274 chLatin_N, chLatin_a, chLatin_m, chLatin_e, chNull
1277 const XMLCh SubjectConfirmation::ARTIFACT01[] = // urn:oasis:names:tc:SAML:1.0:cm:artifact-01
1278 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1279 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1280 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1281 chLatin_c, chLatin_m, chColon, chLatin_a, chLatin_r, chLatin_t, chLatin_i, chLatin_f, chLatin_a, chLatin_c, chLatin_t,
1282 chDash, chDigit_0, chDigit_1, chNull
1285 const XMLCh SubjectConfirmation::ARTIFACT[] = // urn:oasis:names:tc:SAML:1.0:cm:artifact
1286 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1287 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1288 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1289 chLatin_c, chLatin_m, chColon, chLatin_a, chLatin_r, chLatin_t, chLatin_i, chLatin_f, chLatin_a, chLatin_c, chLatin_t, chNull
1292 const XMLCh SubjectConfirmation::BEARER[] = // urn:oasis:names:tc:SAML:1.0:cm:bearer
1293 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1294 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1295 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1296 chLatin_c, chLatin_m, chColon, chLatin_b, chLatin_e, chLatin_a, chLatin_r, chLatin_e, chLatin_r, chNull
1299 const XMLCh SubjectConfirmation::HOLDER_KEY[] = // urn:oasis:names:tc:SAML:1.0:cm:holder-of-key
1300 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1301 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1302 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1303 chLatin_c, chLatin_m, chColon, chLatin_h, chLatin_o, chLatin_l, chLatin_d, chLatin_e, chLatin_r, chDash,
1304 chLatin_o, chLatin_f, chDash, chLatin_k, chLatin_e, chLatin_y, chNull
1307 const XMLCh SubjectConfirmation::SENDER_VOUCHES[] = // urn:oasis:names:tc:SAML:1.0:cm:sender-vouches
1308 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1309 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1310 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1311 chLatin_c, chLatin_m, chColon, chLatin_s, chLatin_e, chLatin_n, chLatin_d, chLatin_e, chLatin_r, chDash,
1312 chLatin_v, chLatin_o, chLatin_u, chLatin_c, chLatin_h, chLatin_e, chLatin_s, chNull
1315 const XMLCh Action::RWEDC_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:rwedc
1316 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1317 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1318 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1319 chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1320 chLatin_r, chLatin_w, chLatin_e, chLatin_d, chLatin_c, chNull
1323 const XMLCh Action::RWEDC_NEG_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:rwedc-negation
1324 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1325 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1326 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1327 chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1328 chLatin_r, chLatin_w, chLatin_e, chLatin_d, chLatin_c, chDash,
1329 chLatin_n, chLatin_e, chLatin_g, chLatin_a, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chNull
1332 const XMLCh Action::GHPP_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:ghpp
1333 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1334 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1335 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1336 chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1337 chLatin_g, chLatin_h, chLatin_p, chLatin_p, chNull
1340 const XMLCh Action::UNIX_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:unix
1341 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1342 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1343 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1344 chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1345 chLatin_u, chLatin_n, chLatin_i, chLatin_x, chNull