2 * Copyright 2001-2010 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.
20 * Implementation classes for SAML 1.x Assertions schema.
24 #include "exceptions.h"
25 #include "saml1/core/Assertions.h"
26 #include "signature/ContentReference.h"
28 #include <xmltooling/AbstractComplexElement.h>
29 #include <xmltooling/AbstractSimpleElement.h>
30 #include <xmltooling/impl/AnyElement.h>
31 #include <xmltooling/io/AbstractXMLObjectMarshaller.h>
32 #include <xmltooling/io/AbstractXMLObjectUnmarshaller.h>
33 #include <xmltooling/signature/KeyInfo.h>
34 #include <xmltooling/signature/Signature.h>
35 #include <xmltooling/util/DateTime.h>
36 #include <xmltooling/util/XMLHelper.h>
40 #include <xercesc/util/XMLUniDefs.hpp>
42 using namespace opensaml::saml1;
43 using namespace xmlsignature;
44 using namespace xmltooling;
46 using xmlconstants::XMLSIG_NS;
47 using xmlconstants::XML_ONE;
48 using samlconstants::SAML1_NS;
50 #if defined (_MSC_VER)
51 #pragma warning( push )
52 #pragma warning( disable : 4250 4251 )
58 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AssertionIDReference);
59 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,Audience);
60 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,ConfirmationMethod);
62 class SAML_DLLLOCAL ConditionImpl : public virtual Condition, public AnyElementImpl
65 virtual ~ConditionImpl() {}
67 ConditionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
68 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
71 ConditionImpl(const ConditionImpl& src) : AbstractXMLObject(src), AnyElementImpl(src) {}
73 IMPL_XMLOBJECT_CLONE(Condition);
76 class SAML_DLLLOCAL AudienceRestrictionConditionImpl : public virtual AudienceRestrictionCondition,
77 public AbstractComplexElement,
78 public AbstractDOMCachingXMLObject,
79 public AbstractXMLObjectMarshaller,
80 public AbstractXMLObjectUnmarshaller
83 virtual ~AudienceRestrictionConditionImpl() {}
85 AudienceRestrictionConditionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
86 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
89 AudienceRestrictionConditionImpl(const AudienceRestrictionConditionImpl& src)
90 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
91 VectorOf(Audience) v=getAudiences();
92 for (vector<Audience*>::const_iterator i=src.m_Audiences.begin(); i!=src.m_Audiences.end(); i++) {
94 v.push_back((*i)->cloneAudience());
99 IMPL_XMLOBJECT_CLONE(AudienceRestrictionCondition);
100 Condition* cloneCondition() const {
101 return cloneAudienceRestrictionCondition();
103 IMPL_TYPED_CHILDREN(Audience,m_children.end());
106 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
107 PROC_TYPED_CHILDREN(Audience,SAML1_NS,false);
108 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
112 class SAML_DLLLOCAL DoNotCacheConditionImpl : public virtual DoNotCacheCondition,
113 public AbstractSimpleElement,
114 public AbstractDOMCachingXMLObject,
115 public AbstractXMLObjectMarshaller,
116 public AbstractXMLObjectUnmarshaller
119 virtual ~DoNotCacheConditionImpl() {}
121 DoNotCacheConditionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
122 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
125 DoNotCacheConditionImpl(const DoNotCacheConditionImpl& src)
126 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
129 IMPL_XMLOBJECT_CLONE(DoNotCacheCondition);
130 Condition* cloneCondition() const {
131 return cloneDoNotCacheCondition();
135 class SAML_DLLLOCAL ConditionsImpl : public virtual Conditions,
136 public AbstractComplexElement,
137 public AbstractDOMCachingXMLObject,
138 public AbstractXMLObjectMarshaller,
139 public AbstractXMLObjectUnmarshaller
142 virtual ~ConditionsImpl() {
144 delete m_NotOnOrAfter;
147 ConditionsImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
148 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
152 ConditionsImpl(const ConditionsImpl& src)
153 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
155 setNotBefore(src.getNotBefore());
156 setNotOnOrAfter(src.getNotOnOrAfter());
158 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
160 AudienceRestrictionCondition* arc=dynamic_cast<AudienceRestrictionCondition*>(*i);
162 getAudienceRestrictionConditions().push_back(arc->cloneAudienceRestrictionCondition());
166 DoNotCacheCondition* dncc=dynamic_cast<DoNotCacheCondition*>(*i);
168 getDoNotCacheConditions().push_back(dncc->cloneDoNotCacheCondition());
172 Condition* c=dynamic_cast<Condition*>(*i);
174 getConditions().push_back(c->cloneCondition());
182 m_NotBefore=m_NotOnOrAfter=nullptr;
185 IMPL_XMLOBJECT_CLONE(Conditions);
186 IMPL_DATETIME_ATTRIB(NotBefore,0);
187 IMPL_DATETIME_ATTRIB(NotOnOrAfter,SAMLTIME_MAX);
188 IMPL_TYPED_CHILDREN(AudienceRestrictionCondition, m_children.end());
189 IMPL_TYPED_CHILDREN(DoNotCacheCondition,m_children.end());
190 IMPL_TYPED_CHILDREN(Condition,m_children.end());
193 void marshallAttributes(DOMElement* domElement) const {
194 MARSHALL_DATETIME_ATTRIB(NotBefore,NOTBEFORE,nullptr);
195 MARSHALL_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,nullptr);
198 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
199 PROC_TYPED_CHILDREN(AudienceRestrictionCondition,SAML1_NS,true);
200 PROC_TYPED_CHILDREN(DoNotCacheCondition,SAML1_NS,true);
201 PROC_TYPED_CHILDREN(Condition,SAML1_NS,true);
202 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
205 void processAttribute(const DOMAttr* attribute) {
206 PROC_DATETIME_ATTRIB(NotBefore,NOTBEFORE,nullptr);
207 PROC_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,nullptr);
211 class SAML_DLLLOCAL NameIdentifierImpl : public virtual NameIdentifier,
212 public AbstractSimpleElement,
213 public AbstractDOMCachingXMLObject,
214 public AbstractXMLObjectMarshaller,
215 public AbstractXMLObjectUnmarshaller
218 virtual ~NameIdentifierImpl() {
219 XMLString::release(&m_Format);
220 XMLString::release(&m_NameQualifier);
223 NameIdentifierImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
224 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
228 NameIdentifierImpl(const NameIdentifierImpl& src)
229 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
231 setFormat(src.getFormat());
232 setNameQualifier(src.getNameQualifier());
236 m_Format=m_NameQualifier=nullptr;
239 IMPL_XMLOBJECT_CLONE(NameIdentifier);
240 IMPL_STRING_ATTRIB(Format);
241 IMPL_STRING_ATTRIB(NameQualifier);
244 void marshallAttributes(DOMElement* domElement) const {
245 MARSHALL_STRING_ATTRIB(Format,FORMAT,nullptr);
246 MARSHALL_STRING_ATTRIB(NameQualifier,NAMEQUALIFIER,nullptr);
249 void processAttribute(const DOMAttr* attribute) {
250 PROC_STRING_ATTRIB(Format,FORMAT,nullptr);
251 PROC_STRING_ATTRIB(NameQualifier,NAMEQUALIFIER,nullptr);
255 class SAML_DLLLOCAL SubjectConfirmationDataImpl : public virtual SubjectConfirmationData, public AnyElementImpl
258 virtual ~SubjectConfirmationDataImpl() {}
260 SubjectConfirmationDataImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
261 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
264 SubjectConfirmationDataImpl(const SubjectConfirmationDataImpl& src) : AbstractXMLObject(src), AnyElementImpl(src) {
267 IMPL_XMLOBJECT_CLONE(SubjectConfirmationData);
270 class SAML_DLLLOCAL SubjectConfirmationImpl : public virtual SubjectConfirmation,
271 public AbstractComplexElement,
272 public AbstractDOMCachingXMLObject,
273 public AbstractXMLObjectMarshaller,
274 public AbstractXMLObjectUnmarshaller
277 virtual ~SubjectConfirmationImpl() {}
279 SubjectConfirmationImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
280 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
284 SubjectConfirmationImpl(const SubjectConfirmationImpl& src)
285 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
287 if (src.getSubjectConfirmationData())
288 setSubjectConfirmationData(src.getSubjectConfirmationData()->clone());
289 if (src.getKeyInfo())
290 setKeyInfo(src.getKeyInfo()->cloneKeyInfo());
291 VectorOf(ConfirmationMethod) v=getConfirmationMethods();
292 for (vector<ConfirmationMethod*>::const_iterator i=src.m_ConfirmationMethods.begin(); i!=src.m_ConfirmationMethods.end(); i++) {
294 v.push_back((*i)->cloneConfirmationMethod());
300 m_SubjectConfirmationData=nullptr;
302 m_children.push_back(nullptr);
303 m_children.push_back(nullptr);
304 m_pos_SubjectConfirmationData=m_children.begin();
305 m_pos_KeyInfo=m_pos_SubjectConfirmationData;
309 IMPL_XMLOBJECT_CLONE(SubjectConfirmation);
310 IMPL_TYPED_CHILDREN(ConfirmationMethod,m_pos_SubjectConfirmationData);
311 IMPL_XMLOBJECT_CHILD(SubjectConfirmationData);
312 IMPL_TYPED_CHILD(KeyInfo);
315 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
316 PROC_TYPED_CHILDREN(ConfirmationMethod,SAML1_NS,false);
317 PROC_TYPED_CHILD(KeyInfo,XMLSIG_NS,false);
319 // Anything else we'll assume is the data.
320 if (getSubjectConfirmationData())
321 throw UnmarshallingException("Invalid child element: $1",params(1,childXMLObject->getElementQName().toString().c_str()));
322 setSubjectConfirmationData(childXMLObject);
326 class SAML_DLLLOCAL SubjectImpl : public virtual Subject,
327 public AbstractComplexElement,
328 public AbstractDOMCachingXMLObject,
329 public AbstractXMLObjectMarshaller,
330 public AbstractXMLObjectUnmarshaller
333 virtual ~SubjectImpl() {}
335 SubjectImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
336 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
340 SubjectImpl(const SubjectImpl& src)
341 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
343 if (src.getNameIdentifier())
344 setNameIdentifier(src.getNameIdentifier()->cloneNameIdentifier());
345 if (src.getSubjectConfirmation())
346 setSubjectConfirmation(src.getSubjectConfirmation()->cloneSubjectConfirmation());
350 m_NameIdentifier=nullptr;
351 m_SubjectConfirmation=nullptr;
352 m_children.push_back(nullptr);
353 m_children.push_back(nullptr);
354 m_pos_NameIdentifier=m_children.begin();
355 m_pos_SubjectConfirmation=m_pos_NameIdentifier;
356 ++m_pos_SubjectConfirmation;
359 IMPL_XMLOBJECT_CLONE(Subject);
360 IMPL_TYPED_CHILD(NameIdentifier);
361 IMPL_TYPED_CHILD(SubjectConfirmation);
364 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
365 PROC_TYPED_CHILD(NameIdentifier,SAML1_NS,true);
366 PROC_TYPED_CHILD(SubjectConfirmation,SAML1_NS,true);
367 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
371 class SAML_DLLLOCAL StatementImpl : public virtual Statement, public AnyElementImpl
374 virtual ~StatementImpl() {}
376 StatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
377 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
380 StatementImpl(const StatementImpl& src) : AbstractXMLObject(src), AnyElementImpl(src) {}
382 IMPL_XMLOBJECT_CLONE(Statement);
385 class SAML_DLLLOCAL SubjectStatementImpl : public virtual SubjectStatement,
386 public AbstractComplexElement,
387 public AbstractDOMCachingXMLObject,
388 public AbstractXMLObjectMarshaller,
389 public AbstractXMLObjectUnmarshaller
393 m_children.push_back(nullptr);
394 m_pos_Subject=m_children.begin();
397 SubjectStatementImpl() {
401 virtual ~SubjectStatementImpl() {}
403 SubjectStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
404 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
408 SubjectStatementImpl(const SubjectStatementImpl& src)
409 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
411 if (src.getSubject())
412 setSubject(src.getSubject()->cloneSubject());
415 IMPL_TYPED_CHILD(Subject);
418 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
419 PROC_TYPED_CHILD(Subject,SAML1_NS,true);
420 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
424 class SAML_DLLLOCAL SubjectLocalityImpl : public virtual SubjectLocality,
425 public AbstractSimpleElement,
426 public AbstractDOMCachingXMLObject,
427 public AbstractXMLObjectMarshaller,
428 public AbstractXMLObjectUnmarshaller
431 virtual ~SubjectLocalityImpl() {
432 XMLString::release(&m_IPAddress);
433 XMLString::release(&m_DNSAddress);
436 SubjectLocalityImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
437 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
441 SubjectLocalityImpl(const SubjectLocalityImpl& src)
442 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
444 setIPAddress(src.getIPAddress());
445 setDNSAddress(src.getDNSAddress());
449 m_IPAddress=m_DNSAddress=nullptr;
452 IMPL_XMLOBJECT_CLONE(SubjectLocality);
453 IMPL_STRING_ATTRIB(IPAddress);
454 IMPL_STRING_ATTRIB(DNSAddress);
457 void marshallAttributes(DOMElement* domElement) const {
458 MARSHALL_STRING_ATTRIB(IPAddress,IPADDRESS,nullptr);
459 MARSHALL_STRING_ATTRIB(DNSAddress,DNSADDRESS,nullptr);
462 void processAttribute(const DOMAttr* attribute) {
463 PROC_STRING_ATTRIB(IPAddress,IPADDRESS,nullptr);
464 PROC_STRING_ATTRIB(DNSAddress,DNSADDRESS,nullptr);
468 class SAML_DLLLOCAL AuthorityBindingImpl : public virtual AuthorityBinding,
469 public AbstractSimpleElement,
470 public AbstractDOMCachingXMLObject,
471 public AbstractXMLObjectMarshaller,
472 public AbstractXMLObjectUnmarshaller
475 virtual ~AuthorityBindingImpl() {
476 delete m_AuthorityKind;
477 XMLString::release(&m_Location);
478 XMLString::release(&m_Binding);
481 AuthorityBindingImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
482 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
486 AuthorityBindingImpl(const AuthorityBindingImpl& src)
487 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
489 setAuthorityKind(src.getAuthorityKind());
490 setLocation(src.getLocation());
491 setBinding(src.getBinding());
495 m_AuthorityKind=nullptr;
496 m_Location=m_Binding=nullptr;
499 IMPL_XMLOBJECT_CLONE(AuthorityBinding);
500 IMPL_XMLOBJECT_ATTRIB(AuthorityKind,xmltooling::QName);
501 IMPL_STRING_ATTRIB(Location);
502 IMPL_STRING_ATTRIB(Binding);
505 void marshallAttributes(DOMElement* domElement) const {
506 MARSHALL_QNAME_ATTRIB(AuthorityKind,AUTHORITYKIND,nullptr);
507 MARSHALL_STRING_ATTRIB(Location,LOCATION,nullptr);
508 MARSHALL_STRING_ATTRIB(Binding,BINDING,nullptr);
511 void processAttribute(const DOMAttr* attribute) {
512 PROC_QNAME_ATTRIB(AuthorityKind,AUTHORITYKIND,nullptr);
513 PROC_STRING_ATTRIB(Location,LOCATION,nullptr);
514 PROC_STRING_ATTRIB(Binding,BINDING,nullptr);
518 class SAML_DLLLOCAL AuthenticationStatementImpl : public virtual AuthenticationStatement, public SubjectStatementImpl
521 virtual ~AuthenticationStatementImpl() {
522 XMLString::release(&m_AuthenticationMethod);
523 delete m_AuthenticationInstant;
526 AuthenticationStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
527 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
531 AuthenticationStatementImpl(const AuthenticationStatementImpl& src) : AbstractXMLObject(src), SubjectStatementImpl(src) {
533 setAuthenticationMethod(src.getAuthenticationMethod());
534 setAuthenticationInstant(src.getAuthenticationInstant());
535 if (src.getSubjectLocality())
536 setSubjectLocality(src.getSubjectLocality()->cloneSubjectLocality());
537 VectorOf(AuthorityBinding) v=getAuthorityBindings();
538 for (vector<AuthorityBinding*>::const_iterator i=src.m_AuthorityBindings.begin(); i!=src.m_AuthorityBindings.end(); i++) {
540 v.push_back((*i)->cloneAuthorityBinding());
546 m_AuthenticationMethod=nullptr;
547 m_AuthenticationInstant=nullptr;
548 m_SubjectLocality=nullptr;
549 m_children.push_back(nullptr);
550 m_pos_SubjectLocality=m_pos_Subject;
551 ++m_pos_SubjectLocality;
554 IMPL_XMLOBJECT_CLONE(AuthenticationStatement);
555 SubjectStatement* cloneSubjectStatement() const {
556 return cloneAuthenticationStatement();
558 Statement* cloneStatement() const {
559 return cloneAuthenticationStatement();
561 IMPL_STRING_ATTRIB(AuthenticationMethod);
562 IMPL_DATETIME_ATTRIB(AuthenticationInstant,0);
563 IMPL_TYPED_CHILD(SubjectLocality);
564 IMPL_TYPED_CHILDREN(AuthorityBinding, m_children.end());
567 void marshallAttributes(DOMElement* domElement) const {
568 MARSHALL_STRING_ATTRIB(AuthenticationMethod,AUTHENTICATIONMETHOD,nullptr);
569 MARSHALL_DATETIME_ATTRIB(AuthenticationInstant,AUTHENTICATIONINSTANT,nullptr);
570 SubjectStatementImpl::marshallAttributes(domElement);
573 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
574 PROC_TYPED_CHILD(SubjectLocality,SAML1_NS,false);
575 PROC_TYPED_CHILDREN(AuthorityBinding,SAML1_NS,false);
576 SubjectStatementImpl::processChildElement(childXMLObject,root);
579 void processAttribute(const DOMAttr* attribute) {
580 PROC_STRING_ATTRIB(AuthenticationMethod,AUTHENTICATIONMETHOD,nullptr);
581 PROC_DATETIME_ATTRIB(AuthenticationInstant,AUTHENTICATIONINSTANT,nullptr);
582 SubjectStatementImpl::processAttribute(attribute);
586 class SAML_DLLLOCAL ActionImpl : public virtual Action,
587 public AbstractSimpleElement,
588 public AbstractDOMCachingXMLObject,
589 public AbstractXMLObjectMarshaller,
590 public AbstractXMLObjectUnmarshaller
593 virtual ~ActionImpl() {
594 XMLString::release(&m_Namespace);
597 ActionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
598 : AbstractXMLObject(nsURI, localName, prefix, schemaType), m_Namespace(nullptr) {
601 ActionImpl(const ActionImpl& src) : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
602 setNamespace(src.getNamespace());
605 IMPL_XMLOBJECT_CLONE(Action);
606 IMPL_STRING_ATTRIB(Namespace);
609 void marshallAttributes(DOMElement* domElement) const {
610 MARSHALL_STRING_ATTRIB(Namespace,NAMESPACE,nullptr);
613 void processAttribute(const DOMAttr* attribute) {
614 PROC_STRING_ATTRIB(Namespace,NAMESPACE,nullptr);
618 class SAML_DLLLOCAL EvidenceImpl : public virtual Evidence,
619 public AbstractComplexElement,
620 public AbstractDOMCachingXMLObject,
621 public AbstractXMLObjectMarshaller,
622 public AbstractXMLObjectUnmarshaller
625 virtual ~EvidenceImpl() {}
627 EvidenceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
628 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
631 EvidenceImpl(const EvidenceImpl& src)
632 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
633 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
635 AssertionIDReference* ref=dynamic_cast<AssertionIDReference*>(*i);
637 getAssertionIDReferences().push_back(ref->cloneAssertionIDReference());
641 Assertion* assertion=dynamic_cast<Assertion*>(*i);
643 getAssertions().push_back(assertion->cloneAssertion());
650 IMPL_XMLOBJECT_CLONE(Evidence);
651 IMPL_TYPED_CHILDREN(AssertionIDReference,m_children.end());
652 IMPL_TYPED_CHILDREN(Assertion,m_children.end());
655 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
656 PROC_TYPED_CHILDREN(AssertionIDReference,SAML1_NS,false);
657 PROC_TYPED_CHILDREN(Assertion,SAML1_NS,true);
658 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
662 class SAML_DLLLOCAL AuthorizationDecisionStatementImpl
663 : public virtual AuthorizationDecisionStatement, public SubjectStatementImpl
666 virtual ~AuthorizationDecisionStatementImpl() {
667 XMLString::release(&m_Resource);
668 XMLString::release(&m_Decision);
671 AuthorizationDecisionStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
672 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
676 AuthorizationDecisionStatementImpl(const AuthorizationDecisionStatementImpl& src)
677 : AbstractXMLObject(src), SubjectStatementImpl(src) {
679 setResource(src.getResource());
680 setDecision(src.getDecision());
681 if (src.getEvidence())
682 setEvidence(src.getEvidence()->cloneEvidence());
683 VectorOf(Action) v=getActions();
684 for (vector<Action*>::const_iterator i=src.m_Actions.begin(); i!=src.m_Actions.end(); i++) {
686 v.push_back((*i)->cloneAction());
695 m_children.push_back(nullptr);
696 m_pos_Evidence=m_pos_Subject;
700 IMPL_XMLOBJECT_CLONE(AuthorizationDecisionStatement);
701 SubjectStatement* cloneSubjectStatement() const {
702 return cloneAuthorizationDecisionStatement();
704 Statement* cloneStatement() const {
705 return cloneAuthorizationDecisionStatement();
707 IMPL_STRING_ATTRIB(Resource);
708 IMPL_STRING_ATTRIB(Decision);
709 IMPL_TYPED_CHILD(Evidence);
710 IMPL_TYPED_CHILDREN(Action, m_pos_Evidence);
713 void marshallAttributes(DOMElement* domElement) const {
714 MARSHALL_STRING_ATTRIB(Resource,RESOURCE,nullptr);
715 MARSHALL_STRING_ATTRIB(Decision,DECISION,nullptr);
716 SubjectStatementImpl::marshallAttributes(domElement);
719 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
720 PROC_TYPED_CHILD(Evidence,SAML1_NS,false);
721 PROC_TYPED_CHILDREN(Action,SAML1_NS,false);
722 SubjectStatementImpl::processChildElement(childXMLObject,root);
725 void processAttribute(const DOMAttr* attribute) {
726 PROC_STRING_ATTRIB(Resource,RESOURCE,nullptr);
727 PROC_STRING_ATTRIB(Decision,DECISION,nullptr);
728 SubjectStatementImpl::processAttribute(attribute);
732 class SAML_DLLLOCAL AttributeDesignatorImpl : public virtual AttributeDesignator,
733 public AbstractSimpleElement,
734 public AbstractDOMCachingXMLObject,
735 public AbstractXMLObjectMarshaller,
736 public AbstractXMLObjectUnmarshaller
739 virtual ~AttributeDesignatorImpl() {
740 XMLString::release(&m_AttributeName);
741 XMLString::release(&m_AttributeNamespace);
744 AttributeDesignatorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
745 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
749 AttributeDesignatorImpl(const AttributeDesignatorImpl& src)
750 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
752 setAttributeName(src.getAttributeName());
753 setAttributeNamespace(src.getAttributeNamespace());
757 m_AttributeName=m_AttributeNamespace=nullptr;
760 IMPL_XMLOBJECT_CLONE(AttributeDesignator);
761 IMPL_STRING_ATTRIB(AttributeName);
762 IMPL_STRING_ATTRIB(AttributeNamespace);
765 void marshallAttributes(DOMElement* domElement) const {
766 MARSHALL_STRING_ATTRIB(AttributeName,ATTRIBUTENAME,nullptr);
767 MARSHALL_STRING_ATTRIB(AttributeNamespace,ATTRIBUTENAMESPACE,nullptr);
770 void processAttribute(const DOMAttr* attribute) {
771 PROC_STRING_ATTRIB(AttributeName,ATTRIBUTENAME,nullptr);
772 PROC_STRING_ATTRIB(AttributeNamespace,ATTRIBUTENAMESPACE,nullptr);
776 class SAML_DLLLOCAL AttributeImpl : public virtual Attribute,
777 public AbstractComplexElement,
778 public AbstractDOMCachingXMLObject,
779 public AbstractXMLObjectMarshaller,
780 public AbstractXMLObjectUnmarshaller
783 virtual ~AttributeImpl() {
784 XMLString::release(&m_AttributeName);
785 XMLString::release(&m_AttributeNamespace);
788 AttributeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
789 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
793 AttributeImpl(const AttributeImpl& src)
794 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
796 setAttributeName(src.getAttributeName());
797 setAttributeNamespace(src.getAttributeNamespace());
798 VectorOf(XMLObject) v=getAttributeValues();
799 for (vector<XMLObject*>::const_iterator i=src.m_AttributeValues.begin(); i!=src.m_AttributeValues.end(); i++) {
801 v.push_back((*i)->clone());
807 m_AttributeName=m_AttributeNamespace=nullptr;
810 IMPL_XMLOBJECT_CLONE(Attribute);
811 AttributeDesignator* cloneAttributeDesignator() const {
812 return cloneAttribute();
814 IMPL_STRING_ATTRIB(AttributeName);
815 IMPL_STRING_ATTRIB(AttributeNamespace);
816 IMPL_XMLOBJECT_CHILDREN(AttributeValue,m_children.end());
819 void marshallAttributes(DOMElement* domElement) const {
820 MARSHALL_STRING_ATTRIB(AttributeName,ATTRIBUTENAME,nullptr);
821 MARSHALL_STRING_ATTRIB(AttributeNamespace,ATTRIBUTENAMESPACE,nullptr);
824 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
825 getAttributeValues().push_back(childXMLObject);
828 void processAttribute(const DOMAttr* attribute) {
829 PROC_STRING_ATTRIB(AttributeName,ATTRIBUTENAME,nullptr);
830 PROC_STRING_ATTRIB(AttributeNamespace,ATTRIBUTENAMESPACE,nullptr);
834 class SAML_DLLLOCAL AttributeValueImpl : public virtual AttributeValue, public AnyElementImpl
837 virtual ~AttributeValueImpl() {}
839 AttributeValueImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
840 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
843 AttributeValueImpl(const AttributeValueImpl& src) : AbstractXMLObject(src), AnyElementImpl(src) {}
845 IMPL_XMLOBJECT_CLONE(AttributeValue);
848 class SAML_DLLLOCAL AttributeStatementImpl : public virtual AttributeStatement, public SubjectStatementImpl
851 virtual ~AttributeStatementImpl() {}
853 AttributeStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
854 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
857 AttributeStatementImpl(const AttributeStatementImpl& src)
858 : AbstractXMLObject(src), SubjectStatementImpl(src) {
859 VectorOf(Attribute) v=getAttributes();
860 for (vector<Attribute*>::const_iterator i=src.m_Attributes.begin(); i!=src.m_Attributes.end(); i++) {
862 v.push_back((*i)->cloneAttribute());
867 IMPL_XMLOBJECT_CLONE(AttributeStatement);
868 SubjectStatement* cloneSubjectStatement() const {
869 return cloneAttributeStatement();
871 Statement* cloneStatement() const {
872 return cloneAttributeStatement();
874 IMPL_TYPED_CHILDREN(Attribute, m_children.end());
877 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
878 PROC_TYPED_CHILDREN(Attribute,SAML1_NS,true);
879 SubjectStatementImpl::processChildElement(childXMLObject,root);
883 class SAML_DLLLOCAL AdviceImpl : public virtual Advice,
884 public AbstractComplexElement,
885 public AbstractDOMCachingXMLObject,
886 public AbstractXMLObjectMarshaller,
887 public AbstractXMLObjectUnmarshaller
890 virtual ~AdviceImpl() {}
892 AdviceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
893 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
896 AdviceImpl(const AdviceImpl& src)
897 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
898 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
900 AssertionIDReference* ref=dynamic_cast<AssertionIDReference*>(*i);
902 getAssertionIDReferences().push_back(ref->cloneAssertionIDReference());
906 Assertion* assertion=dynamic_cast<Assertion*>(*i);
908 getAssertions().push_back(assertion->cloneAssertion());
912 getUnknownXMLObjects().push_back((*i)->clone());
917 IMPL_XMLOBJECT_CLONE(Advice);
918 IMPL_TYPED_CHILDREN(AssertionIDReference,m_children.end());
919 IMPL_TYPED_CHILDREN(Assertion,m_children.end());
920 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
923 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
924 PROC_TYPED_CHILDREN(AssertionIDReference,SAML1_NS,false);
925 PROC_TYPED_CHILDREN(Assertion,SAML1_NS,true);
928 const XMLCh* nsURI=root->getNamespaceURI();
929 if (!XMLString::equals(nsURI,SAML1_NS) && nsURI && *nsURI) {
930 getUnknownXMLObjects().push_back(childXMLObject);
934 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
938 class SAML_DLLLOCAL AssertionImpl : public virtual Assertion,
939 public AbstractComplexElement,
940 public AbstractDOMCachingXMLObject,
941 public AbstractXMLObjectMarshaller,
942 public AbstractXMLObjectUnmarshaller
945 m_MinorVersion=nullptr;
946 m_AssertionID=nullptr;
948 m_IssueInstant=nullptr;
949 m_children.push_back(nullptr);
950 m_children.push_back(nullptr);
951 m_children.push_back(nullptr);
952 m_Conditions=nullptr;
955 m_pos_Conditions=m_children.begin();
956 m_pos_Advice=m_pos_Conditions;
958 m_pos_Signature=m_pos_Advice;
962 virtual ~AssertionImpl() {
963 XMLString::release(&m_MinorVersion);
964 XMLString::release(&m_AssertionID);
965 XMLString::release(&m_Issuer);
966 delete m_IssueInstant;
969 AssertionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
970 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
974 AssertionImpl(const AssertionImpl& src)
975 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
977 setMinorVersion(src.m_MinorVersion);
978 setAssertionID(src.getAssertionID());
979 setIssuer(src.getIssuer());
980 setIssueInstant(src.getIssueInstant());
981 if (src.getConditions())
982 setConditions(src.getConditions()->cloneConditions());
984 setAdvice(src.getAdvice()->cloneAdvice());
985 if (src.getSignature())
986 setSignature(src.getSignature()->cloneSignature());
987 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
989 AuthenticationStatement* authst=dynamic_cast<AuthenticationStatement*>(*i);
991 getAuthenticationStatements().push_back(authst->cloneAuthenticationStatement());
995 AttributeStatement* attst=dynamic_cast<AttributeStatement*>(*i);
997 getAttributeStatements().push_back(attst->cloneAttributeStatement());
1001 AuthorizationDecisionStatement* authzst=dynamic_cast<AuthorizationDecisionStatement*>(*i);
1003 getAuthorizationDecisionStatements().push_back(authzst->cloneAuthorizationDecisionStatement());
1007 SubjectStatement* subst=dynamic_cast<SubjectStatement*>(*i);
1009 getSubjectStatements().push_back(subst->cloneSubjectStatement());
1013 Statement* st=dynamic_cast<Statement*>(*i);
1015 getStatements().push_back(st->cloneStatement());
1022 //IMPL_TYPED_CHILD(Signature);
1023 // Need customized setter.
1025 Signature* m_Signature;
1026 list<XMLObject*>::iterator m_pos_Signature;
1028 Signature* getSignature() const {
1032 void setSignature(Signature* sig) {
1033 prepareForAssignment(m_Signature,sig);
1034 *m_pos_Signature=m_Signature=sig;
1035 // Sync content reference back up.
1037 m_Signature->setContentReference(new opensaml::ContentReference(*this));
1040 IMPL_XMLOBJECT_CLONE(Assertion);
1041 IMPL_INTEGER_ATTRIB(MinorVersion);
1042 IMPL_STRING_ATTRIB(AssertionID); // have to special-case getXMLID
1043 const XMLCh* getXMLID() const {
1044 pair<bool,int> v = getMinorVersion();
1045 return (!v.first || v.second > 0) ? m_AssertionID : nullptr;
1047 const XMLCh* getID() const {
1048 return getAssertionID();
1050 void releaseDOM() const {
1052 getDOM()->removeAttributeNS(nullptr, ASSERTIONID_ATTRIB_NAME);
1053 AbstractDOMCachingXMLObject::releaseDOM();
1055 IMPL_STRING_ATTRIB(Issuer);
1056 IMPL_DATETIME_ATTRIB(IssueInstant,0);
1057 IMPL_TYPED_CHILD(Conditions);
1058 IMPL_TYPED_CHILD(Advice);
1059 IMPL_TYPED_CHILDREN(Statement, m_pos_Signature);
1060 IMPL_TYPED_CHILDREN(SubjectStatement, m_pos_Signature);
1061 IMPL_TYPED_CHILDREN(AuthenticationStatement, m_pos_Signature);
1062 IMPL_TYPED_CHILDREN(AttributeStatement, m_pos_Signature);
1063 IMPL_TYPED_CHILDREN(AuthorizationDecisionStatement, m_pos_Signature);
1066 void marshallAttributes(DOMElement* domElement) const {
1067 static const XMLCh MAJORVERSION[] = UNICODE_LITERAL_12(M,a,j,o,r,V,e,r,s,i,o,n);
1068 domElement->setAttributeNS(nullptr,MAJORVERSION,XML_ONE);
1069 if (!m_MinorVersion)
1070 const_cast<AssertionImpl*>(this)->m_MinorVersion=XMLString::replicate(XML_ONE);
1071 MARSHALL_INTEGER_ATTRIB(MinorVersion,MINORVERSION,nullptr);
1073 const_cast<AssertionImpl*>(this)->m_AssertionID=SAMLConfig::getConfig().generateIdentifier();
1074 domElement->setAttributeNS(nullptr, ASSERTIONID_ATTRIB_NAME, m_AssertionID);
1075 if (*m_MinorVersion!=chDigit_0) {
1076 #ifdef XMLTOOLING_XERCESC_BOOLSETIDATTRIBUTE
1077 domElement->setIdAttributeNS(nullptr, ASSERTIONID_ATTRIB_NAME, true);
1079 domElement->setIdAttributeNS(nullptr, ASSERTIONID_ATTRIB_NAME);
1082 MARSHALL_STRING_ATTRIB(Issuer,ISSUER,nullptr);
1083 if (!m_IssueInstant) {
1084 const_cast<AssertionImpl*>(this)->m_IssueInstantEpoch=time(nullptr);
1085 const_cast<AssertionImpl*>(this)->m_IssueInstant=new DateTime(m_IssueInstantEpoch);
1087 MARSHALL_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,nullptr);
1090 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1091 PROC_TYPED_CHILD(Conditions,SAML1_NS,false);
1092 PROC_TYPED_CHILD(Advice,SAML1_NS,false);
1093 PROC_TYPED_CHILD(Signature,XMLSIG_NS,false);
1094 PROC_TYPED_CHILDREN(AuthenticationStatement,SAML1_NS,false);
1095 PROC_TYPED_CHILDREN(AttributeStatement,SAML1_NS,false);
1096 PROC_TYPED_CHILDREN(AuthorizationDecisionStatement,SAML1_NS,false);
1097 PROC_TYPED_CHILDREN(SubjectStatement,SAML1_NS,true);
1098 PROC_TYPED_CHILDREN(Statement,SAML1_NS,true);
1099 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1102 void unmarshallAttributes(const DOMElement* domElement) {
1103 // Standard processing, but then we check IDness.
1104 AbstractXMLObjectUnmarshaller::unmarshallAttributes(domElement);
1105 if (m_AssertionID && (!m_MinorVersion || *m_MinorVersion!=chDigit_0)) {
1106 #ifdef XMLTOOLING_XERCESC_BOOLSETIDATTRIBUTE
1107 const_cast<DOMElement*>(domElement)->setIdAttributeNS(nullptr, ASSERTIONID_ATTRIB_NAME, true);
1109 const_cast<DOMElement*>(domElement)->setIdAttributeNS(nullptr, ASSERTIONID_ATTRIB_NAME);
1114 void processAttribute(const DOMAttr* attribute) {
1115 static const XMLCh MAJORVERSION[] = UNICODE_LITERAL_12(M,a,j,o,r,V,e,r,s,i,o,n);
1116 if (XMLHelper::isNodeNamed(attribute,nullptr,MAJORVERSION)) {
1117 if (!XMLString::equals(attribute->getValue(),XML_ONE))
1118 throw UnmarshallingException("Assertion has invalid major version.");
1120 PROC_INTEGER_ATTRIB(MinorVersion,MINORVERSION,nullptr);
1121 PROC_STRING_ATTRIB(AssertionID,ASSERTIONID,nullptr);
1122 PROC_STRING_ATTRIB(Issuer,ISSUER,nullptr);
1123 PROC_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,nullptr);
1130 #if defined (_MSC_VER)
1131 #pragma warning( pop )
1134 // Builder Implementations
1136 IMPL_XMLOBJECTBUILDER(Action);
1137 IMPL_XMLOBJECTBUILDER(Advice);
1138 IMPL_XMLOBJECTBUILDER(Assertion);
1139 IMPL_XMLOBJECTBUILDER(AssertionIDReference);
1140 IMPL_XMLOBJECTBUILDER(Attribute);
1141 IMPL_XMLOBJECTBUILDER(AttributeDesignator);
1142 IMPL_XMLOBJECTBUILDER(AttributeStatement);
1143 IMPL_XMLOBJECTBUILDER(AttributeValue);
1144 IMPL_XMLOBJECTBUILDER(Audience);
1145 IMPL_XMLOBJECTBUILDER(AudienceRestrictionCondition);
1146 IMPL_XMLOBJECTBUILDER(AuthenticationStatement);
1147 IMPL_XMLOBJECTBUILDER(AuthorizationDecisionStatement);
1148 IMPL_XMLOBJECTBUILDER(AuthorityBinding);
1149 IMPL_XMLOBJECTBUILDER(Condition);
1150 IMPL_XMLOBJECTBUILDER(Conditions);
1151 IMPL_XMLOBJECTBUILDER(ConfirmationMethod);
1152 IMPL_XMLOBJECTBUILDER(DoNotCacheCondition);
1153 IMPL_XMLOBJECTBUILDER(Evidence);
1154 IMPL_XMLOBJECTBUILDER(NameIdentifier);
1155 IMPL_XMLOBJECTBUILDER(Statement);
1156 IMPL_XMLOBJECTBUILDER(Subject);
1157 IMPL_XMLOBJECTBUILDER(SubjectConfirmation);
1158 IMPL_XMLOBJECTBUILDER(SubjectConfirmationData);
1159 IMPL_XMLOBJECTBUILDER(SubjectLocality);
1162 const XMLCh Action::LOCAL_NAME[] = UNICODE_LITERAL_6(A,c,t,i,o,n);
1163 const XMLCh Action::TYPE_NAME[] = UNICODE_LITERAL_10(A,c,t,i,o,n,T,y,p,e);
1164 const XMLCh Action::NAMESPACE_ATTRIB_NAME[] = UNICODE_LITERAL_9(N,a,m,e,s,p,a,c,e);
1165 const XMLCh Advice::LOCAL_NAME[] = UNICODE_LITERAL_6(A,d,v,i,c,e);
1166 const XMLCh Advice::TYPE_NAME[] = UNICODE_LITERAL_10(A,d,v,i,c,e,T,y,p,e);
1167 const XMLCh Assertion::LOCAL_NAME[] = UNICODE_LITERAL_9(A,s,s,e,r,t,i,o,n);
1168 const XMLCh Assertion::TYPE_NAME[] = UNICODE_LITERAL_13(A,s,s,e,r,t,i,o,n,T,y,p,e);
1169 const XMLCh Assertion::MINORVERSION_ATTRIB_NAME[] = UNICODE_LITERAL_12(M,i,n,o,r,V,e,r,s,i,o,n);
1170 const XMLCh Assertion::ASSERTIONID_ATTRIB_NAME[] = UNICODE_LITERAL_11(A,s,s,e,r,t,i,o,n,I,D);
1171 const XMLCh Assertion::ISSUER_ATTRIB_NAME[] = UNICODE_LITERAL_6(I,s,s,u,e,r);
1172 const XMLCh Assertion::ISSUEINSTANT_ATTRIB_NAME[] = UNICODE_LITERAL_12(I,s,s,u,e,I,n,s,t,a,n,t);
1173 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);
1174 const XMLCh Attribute::LOCAL_NAME[] = UNICODE_LITERAL_9(A,t,t,r,i,b,u,t,e);
1175 const XMLCh Attribute::TYPE_NAME[] = UNICODE_LITERAL_13(A,t,t,r,i,b,u,t,e,T,y,p,e);
1176 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);
1177 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);
1178 const XMLCh AttributeDesignator::ATTRIBUTENAME_ATTRIB_NAME[] = UNICODE_LITERAL_13(A,t,t,r,i,b,u,t,e,N,a,m,e);
1179 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);
1180 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);
1181 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);
1182 const XMLCh AttributeValue::LOCAL_NAME[] = UNICODE_LITERAL_14(A,t,t,r,i,b,u,t,e,V,a,l,u,e);
1183 const XMLCh Audience::LOCAL_NAME[] = UNICODE_LITERAL_8(A,u,d,i,e,n,c,e);
1184 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);
1185 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);
1186 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);
1187 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);
1188 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);
1189 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);
1190 const XMLCh AuthorityBinding::LOCAL_NAME[] = UNICODE_LITERAL_16(A,u,t,h,o,r,i,t,y,B,i,n,d,i,n,g);
1191 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);
1192 const XMLCh AuthorityBinding::AUTHORITYKIND_ATTRIB_NAME[] = UNICODE_LITERAL_13(A,u,t,h,o,r,i,t,y,K,i,n,d);
1193 const XMLCh AuthorityBinding::LOCATION_ATTRIB_NAME[] = UNICODE_LITERAL_8(L,o,c,a,t,i,o,n);
1194 const XMLCh AuthorityBinding::BINDING_ATTRIB_NAME[] = UNICODE_LITERAL_7(B,i,n,d,i,n,g);
1195 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);
1196 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);
1197 const XMLCh AuthorizationDecisionStatement::RESOURCE_ATTRIB_NAME[] = UNICODE_LITERAL_8(R,e,s,o,u,r,c,e);
1198 const XMLCh AuthorizationDecisionStatement::DECISION_ATTRIB_NAME[] = UNICODE_LITERAL_8(D,e,c,i,s,i,o,n);
1199 const XMLCh AuthorizationDecisionStatement::DECISION_PERMIT[] = UNICODE_LITERAL_6(P,e,r,m,i,t);
1200 const XMLCh AuthorizationDecisionStatement::DECISION_DENY[] = UNICODE_LITERAL_4(D,e,n,y);
1201 const XMLCh AuthorizationDecisionStatement::DECISION_INDETERMINATE[] = UNICODE_LITERAL_13(I,n,d,e,t,e,r,m,i,n,a,t,e);
1202 const XMLCh Condition::LOCAL_NAME[] = UNICODE_LITERAL_9(C,o,n,d,i,t,i,o,n);
1203 const XMLCh Conditions::LOCAL_NAME[] = UNICODE_LITERAL_10(C,o,n,d,i,t,i,o,n,s);
1204 const XMLCh Conditions::TYPE_NAME[] = UNICODE_LITERAL_14(C,o,n,d,i,t,i,o,n,s,T,y,p,e);
1205 const XMLCh Conditions::NOTBEFORE_ATTRIB_NAME[] = UNICODE_LITERAL_9(N,o,t,B,e,f,o,r,e);
1206 const XMLCh Conditions::NOTONORAFTER_ATTRIB_NAME[] =UNICODE_LITERAL_12(N,o,t,O,n,O,r,A,f,t,e,r);
1207 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);
1208 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);
1209 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);
1210 const XMLCh Evidence::LOCAL_NAME[] = UNICODE_LITERAL_8(E,v,i,d,e,n,c,e);
1211 const XMLCh Evidence::TYPE_NAME[] = UNICODE_LITERAL_12(E,v,i,d,e,n,c,e,T,y,p,e);
1212 const XMLCh NameIdentifier::LOCAL_NAME[] = UNICODE_LITERAL_14(N,a,m,e,I,d,e,n,t,i,f,i,e,r);
1213 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);
1214 const XMLCh NameIdentifier::NAMEQUALIFIER_ATTRIB_NAME[] = UNICODE_LITERAL_13(N,a,m,e,Q,u,a,l,i,f,i,e,r);
1215 const XMLCh NameIdentifier::FORMAT_ATTRIB_NAME[] = UNICODE_LITERAL_6(F,o,r,m,a,t);
1216 const XMLCh Statement::LOCAL_NAME[] = UNICODE_LITERAL_9(S,t,a,t,e,m,e,n,t);
1217 const XMLCh Subject::LOCAL_NAME[] = UNICODE_LITERAL_7(S,u,b,j,e,c,t);
1218 const XMLCh Subject::TYPE_NAME[] = UNICODE_LITERAL_11(S,u,b,j,e,c,t,T,y,p,e);
1219 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);
1220 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);
1221 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);
1222 const XMLCh SubjectLocality::LOCAL_NAME[] = UNICODE_LITERAL_15(S,u,b,j,e,c,t,L,o,c,a,l,i,t,y);
1223 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);
1224 const XMLCh SubjectLocality::IPADDRESS_ATTRIB_NAME[] = UNICODE_LITERAL_9(I,P,A,d,d,r,e,s,s);
1225 const XMLCh SubjectLocality::DNSADDRESS_ATTRIB_NAME[] = UNICODE_LITERAL_10(D,N,S,A,d,d,r,e,s,s);
1226 const XMLCh SubjectStatement::LOCAL_NAME[] = UNICODE_LITERAL_16(S,u,b,j,e,c,t,S,t,a,t,e,m,e,n,t);
1228 const XMLCh NameIdentifier::UNSPECIFIED[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified
1229 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1230 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1231 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1232 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1233 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1234 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
1237 const XMLCh NameIdentifier::EMAIL[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress
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_e, chLatin_m, chLatin_a, chLatin_i, chLatin_l, chLatin_A, chLatin_d, chLatin_d, chLatin_r, chLatin_e, chLatin_s, chLatin_s, chNull
1246 const XMLCh NameIdentifier::X509_SUBJECT[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName
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_X, chDigit_5, chDigit_0, chDigit_9, chLatin_S, chLatin_u, chLatin_b, chLatin_j, chLatin_e, chLatin_c, chLatin_t,
1253 chLatin_N, chLatin_a, chLatin_m, chLatin_e, chNull
1256 const XMLCh NameIdentifier::WIN_DOMAIN_QUALIFIED[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName
1257 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1258 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1259 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1260 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1261 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1262 chLatin_W, chLatin_i, chLatin_n, chLatin_d, chLatin_o, chLatin_w, chLatin_s,
1263 chLatin_D, chLatin_o, chLatin_m, chLatin_a, chLatin_i, chLatin_n,
1264 chLatin_Q, chLatin_u, chLatin_a, chLatin_l, chLatin_i, chLatin_f, chLatin_i, chLatin_e, chLatin_d,
1265 chLatin_N, chLatin_a, chLatin_m, chLatin_e, chNull
1268 const XMLCh SubjectConfirmation::ARTIFACT01[] = // urn:oasis:names:tc:SAML:1.0:cm:artifact-01
1269 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1270 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1271 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1272 chLatin_c, chLatin_m, chColon, chLatin_a, chLatin_r, chLatin_t, chLatin_i, chLatin_f, chLatin_a, chLatin_c, chLatin_t,
1273 chDash, chDigit_0, chDigit_1, chNull
1276 const XMLCh SubjectConfirmation::ARTIFACT[] = // urn:oasis:names:tc:SAML:1.0:cm:artifact
1277 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1278 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1279 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1280 chLatin_c, chLatin_m, chColon, chLatin_a, chLatin_r, chLatin_t, chLatin_i, chLatin_f, chLatin_a, chLatin_c, chLatin_t, chNull
1283 const XMLCh SubjectConfirmation::BEARER[] = // urn:oasis:names:tc:SAML:1.0:cm:bearer
1284 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1285 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1286 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1287 chLatin_c, chLatin_m, chColon, chLatin_b, chLatin_e, chLatin_a, chLatin_r, chLatin_e, chLatin_r, chNull
1290 const XMLCh SubjectConfirmation::HOLDER_KEY[] = // urn:oasis:names:tc:SAML:1.0:cm:holder-of-key
1291 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1292 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1293 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1294 chLatin_c, chLatin_m, chColon, chLatin_h, chLatin_o, chLatin_l, chLatin_d, chLatin_e, chLatin_r, chDash,
1295 chLatin_o, chLatin_f, chDash, chLatin_k, chLatin_e, chLatin_y, chNull
1298 const XMLCh SubjectConfirmation::SENDER_VOUCHES[] = // urn:oasis:names:tc:SAML:1.0:cm:sender-vouches
1299 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1300 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1301 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1302 chLatin_c, chLatin_m, chColon, chLatin_s, chLatin_e, chLatin_n, chLatin_d, chLatin_e, chLatin_r, chDash,
1303 chLatin_v, chLatin_o, chLatin_u, chLatin_c, chLatin_h, chLatin_e, chLatin_s, chNull
1306 const XMLCh Action::RWEDC_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:rwedc
1307 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1308 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1309 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1310 chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1311 chLatin_r, chLatin_w, chLatin_e, chLatin_d, chLatin_c, chNull
1314 const XMLCh Action::RWEDC_NEG_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:rwedc-negation
1315 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1316 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1317 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1318 chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1319 chLatin_r, chLatin_w, chLatin_e, chLatin_d, chLatin_c, chDash,
1320 chLatin_n, chLatin_e, chLatin_g, chLatin_a, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chNull
1323 const XMLCh Action::GHPP_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:ghpp
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_g, chLatin_h, chLatin_p, chLatin_p, chNull
1331 const XMLCh Action::UNIX_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:unix
1332 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1333 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1334 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1335 chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1336 chLatin_u, chLatin_n, chLatin_i, chLatin_x, chNull