2 * Copyright 2001-2007 Internet2
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
20 * Implementation classes for SAML 1.x Assertions schema
24 #include "exceptions.h"
25 #include "saml1/core/Assertions.h"
27 #include <xmltooling/AbstractComplexElement.h>
28 #include <xmltooling/AbstractSimpleElement.h>
29 #include <xmltooling/impl/AnyElement.h>
30 #include <xmltooling/io/AbstractXMLObjectMarshaller.h>
31 #include <xmltooling/io/AbstractXMLObjectUnmarshaller.h>
32 #include <xmltooling/util/XMLHelper.h>
36 #include <xercesc/util/XMLUniDefs.hpp>
38 using namespace opensaml::saml1;
39 using namespace xmlsignature;
40 using namespace xmltooling;
42 using xmlconstants::XMLSIG_NS;
43 using xmlconstants::XML_ONE;
44 using samlconstants::SAML1_NS;
46 #if defined (_MSC_VER)
47 #pragma warning( push )
48 #pragma warning( disable : 4250 4251 )
54 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AssertionIDReference);
55 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,Audience);
56 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,ConfirmationMethod);
58 class SAML_DLLLOCAL ConditionImpl : public virtual Condition, public AnyElementImpl
61 virtual ~ConditionImpl() {}
63 ConditionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
64 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
67 ConditionImpl(const ConditionImpl& src) : AnyElementImpl(src) {}
69 IMPL_XMLOBJECT_CLONE(Condition);
72 class SAML_DLLLOCAL AudienceRestrictionConditionImpl : public virtual AudienceRestrictionCondition,
73 public AbstractComplexElement,
74 public AbstractDOMCachingXMLObject,
75 public AbstractXMLObjectMarshaller,
76 public AbstractXMLObjectUnmarshaller
79 virtual ~AudienceRestrictionConditionImpl() {}
81 AudienceRestrictionConditionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
82 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
85 AudienceRestrictionConditionImpl(const AudienceRestrictionConditionImpl& src)
86 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
87 VectorOf(Audience) v=getAudiences();
88 for (vector<Audience*>::const_iterator i=src.m_Audiences.begin(); i!=src.m_Audiences.end(); i++) {
90 v.push_back((*i)->cloneAudience());
95 IMPL_XMLOBJECT_CLONE(AudienceRestrictionCondition);
96 Condition* cloneCondition() const {
97 return cloneAudienceRestrictionCondition();
99 IMPL_TYPED_CHILDREN(Audience,m_children.end());
102 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
103 PROC_TYPED_CHILDREN(Audience,SAML1_NS,false);
104 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
108 class SAML_DLLLOCAL DoNotCacheConditionImpl : public virtual DoNotCacheCondition,
109 public AbstractSimpleElement,
110 public AbstractDOMCachingXMLObject,
111 public AbstractXMLObjectMarshaller,
112 public AbstractXMLObjectUnmarshaller
115 virtual ~DoNotCacheConditionImpl() {}
117 DoNotCacheConditionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
118 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
121 DoNotCacheConditionImpl(const DoNotCacheConditionImpl& src)
122 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
125 IMPL_XMLOBJECT_CLONE(DoNotCacheCondition);
126 Condition* cloneCondition() const {
127 return cloneDoNotCacheCondition();
131 class SAML_DLLLOCAL ConditionsImpl : public virtual Conditions,
132 public AbstractComplexElement,
133 public AbstractDOMCachingXMLObject,
134 public AbstractXMLObjectMarshaller,
135 public AbstractXMLObjectUnmarshaller
138 virtual ~ConditionsImpl() {
140 delete m_NotOnOrAfter;
143 ConditionsImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
144 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
148 ConditionsImpl(const ConditionsImpl& src)
149 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
151 setNotBefore(src.getNotBefore());
152 setNotOnOrAfter(src.getNotOnOrAfter());
154 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
156 AudienceRestrictionCondition* arc=dynamic_cast<AudienceRestrictionCondition*>(*i);
158 getAudienceRestrictionConditions().push_back(arc->cloneAudienceRestrictionCondition());
162 DoNotCacheCondition* dncc=dynamic_cast<DoNotCacheCondition*>(*i);
164 getDoNotCacheConditions().push_back(dncc->cloneDoNotCacheCondition());
168 Condition* c=dynamic_cast<Condition*>(*i);
170 getConditions().push_back(c->cloneCondition());
178 m_NotBefore=m_NotOnOrAfter=NULL;
181 IMPL_XMLOBJECT_CLONE(Conditions);
182 IMPL_DATETIME_ATTRIB(NotBefore,0);
183 IMPL_DATETIME_ATTRIB(NotOnOrAfter,SAMLTIME_MAX);
184 IMPL_TYPED_CHILDREN(AudienceRestrictionCondition, m_children.end());
185 IMPL_TYPED_CHILDREN(DoNotCacheCondition,m_children.end());
186 IMPL_TYPED_CHILDREN(Condition,m_children.end());
189 void marshallAttributes(DOMElement* domElement) const {
190 MARSHALL_DATETIME_ATTRIB(NotBefore,NOTBEFORE,NULL);
191 MARSHALL_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,NULL);
194 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
195 PROC_TYPED_CHILDREN(AudienceRestrictionCondition,SAML1_NS,true);
196 PROC_TYPED_CHILDREN(DoNotCacheCondition,SAML1_NS,true);
197 PROC_TYPED_CHILDREN(Condition,SAML1_NS,true);
198 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
201 void processAttribute(const DOMAttr* attribute) {
202 PROC_DATETIME_ATTRIB(NotBefore,NOTBEFORE,NULL);
203 PROC_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,NULL);
207 class SAML_DLLLOCAL NameIdentifierImpl : public virtual NameIdentifier,
208 public AbstractSimpleElement,
209 public AbstractDOMCachingXMLObject,
210 public AbstractXMLObjectMarshaller,
211 public AbstractXMLObjectUnmarshaller
214 virtual ~NameIdentifierImpl() {
215 XMLString::release(&m_Format);
216 XMLString::release(&m_NameQualifier);
219 NameIdentifierImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
220 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
224 NameIdentifierImpl(const NameIdentifierImpl& src)
225 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
227 setFormat(src.getFormat());
228 setNameQualifier(src.getNameQualifier());
232 m_Format=m_NameQualifier=NULL;
235 IMPL_XMLOBJECT_CLONE(NameIdentifier);
236 IMPL_STRING_ATTRIB(Format);
237 IMPL_STRING_ATTRIB(NameQualifier);
240 void marshallAttributes(DOMElement* domElement) const {
241 MARSHALL_STRING_ATTRIB(Format,FORMAT,NULL);
242 MARSHALL_STRING_ATTRIB(NameQualifier,NAMEQUALIFIER,NULL);
245 void processAttribute(const DOMAttr* attribute) {
246 PROC_STRING_ATTRIB(Format,FORMAT,NULL);
247 PROC_STRING_ATTRIB(NameQualifier,NAMEQUALIFIER,NULL);
251 class SAML_DLLLOCAL SubjectConfirmationDataImpl : public virtual SubjectConfirmationData, public AnyElementImpl
254 virtual ~SubjectConfirmationDataImpl() {}
256 SubjectConfirmationDataImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
257 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
260 SubjectConfirmationDataImpl(const SubjectConfirmationDataImpl& src) : AnyElementImpl(src) {
263 IMPL_XMLOBJECT_CLONE(SubjectConfirmationData);
266 class SAML_DLLLOCAL SubjectConfirmationImpl : public virtual SubjectConfirmation,
267 public AbstractComplexElement,
268 public AbstractDOMCachingXMLObject,
269 public AbstractXMLObjectMarshaller,
270 public AbstractXMLObjectUnmarshaller
273 virtual ~SubjectConfirmationImpl() {}
275 SubjectConfirmationImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
276 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
280 SubjectConfirmationImpl(const SubjectConfirmationImpl& src)
281 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
283 if (src.getSubjectConfirmationData())
284 setSubjectConfirmationData(src.getSubjectConfirmationData()->clone());
285 if (src.getKeyInfo())
286 setKeyInfo(src.getKeyInfo()->cloneKeyInfo());
287 VectorOf(ConfirmationMethod) v=getConfirmationMethods();
288 for (vector<ConfirmationMethod*>::const_iterator i=src.m_ConfirmationMethods.begin(); i!=src.m_ConfirmationMethods.end(); i++) {
290 v.push_back((*i)->cloneConfirmationMethod());
296 m_SubjectConfirmationData=NULL;
298 m_children.push_back(NULL);
299 m_children.push_back(NULL);
300 m_pos_SubjectConfirmationData=m_children.begin();
301 m_pos_KeyInfo=m_pos_SubjectConfirmationData;
305 IMPL_XMLOBJECT_CLONE(SubjectConfirmation);
306 IMPL_TYPED_CHILDREN(ConfirmationMethod,m_pos_SubjectConfirmationData);
307 IMPL_XMLOBJECT_CHILD(SubjectConfirmationData);
308 IMPL_TYPED_CHILD(KeyInfo);
311 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
312 PROC_TYPED_CHILDREN(ConfirmationMethod,SAML1_NS,false);
313 PROC_TYPED_CHILD(KeyInfo,XMLSIG_NS,false);
315 // Anything else we'll assume is the data.
316 if (getSubjectConfirmationData())
317 throw UnmarshallingException("Invalid child element: $1",params(1,childXMLObject->getElementQName().toString().c_str()));
318 setSubjectConfirmationData(childXMLObject);
322 class SAML_DLLLOCAL SubjectImpl : public virtual Subject,
323 public AbstractComplexElement,
324 public AbstractDOMCachingXMLObject,
325 public AbstractXMLObjectMarshaller,
326 public AbstractXMLObjectUnmarshaller
329 virtual ~SubjectImpl() {}
331 SubjectImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
332 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
336 SubjectImpl(const SubjectImpl& src)
337 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
339 if (src.getNameIdentifier())
340 setNameIdentifier(src.getNameIdentifier()->cloneNameIdentifier());
341 if (src.getSubjectConfirmation())
342 setSubjectConfirmation(src.getSubjectConfirmation()->cloneSubjectConfirmation());
346 m_NameIdentifier=NULL;
347 m_SubjectConfirmation=NULL;
348 m_children.push_back(NULL);
349 m_children.push_back(NULL);
350 m_pos_NameIdentifier=m_children.begin();
351 m_pos_SubjectConfirmation=m_pos_NameIdentifier;
352 ++m_pos_SubjectConfirmation;
355 IMPL_XMLOBJECT_CLONE(Subject);
356 IMPL_TYPED_CHILD(NameIdentifier);
357 IMPL_TYPED_CHILD(SubjectConfirmation);
360 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
361 PROC_TYPED_CHILD(NameIdentifier,SAML1_NS,true);
362 PROC_TYPED_CHILD(SubjectConfirmation,SAML1_NS,true);
363 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
367 class SAML_DLLLOCAL StatementImpl : public virtual Statement, public AnyElementImpl
370 virtual ~StatementImpl() {}
372 StatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
373 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
376 StatementImpl(const StatementImpl& src) : AnyElementImpl(src) {}
378 IMPL_XMLOBJECT_CLONE(Statement);
381 class SAML_DLLLOCAL SubjectStatementImpl : public virtual SubjectStatement,
382 public AbstractComplexElement,
383 public AbstractDOMCachingXMLObject,
384 public AbstractXMLObjectMarshaller,
385 public AbstractXMLObjectUnmarshaller
389 m_children.push_back(NULL);
390 m_pos_Subject=m_children.begin();
393 SubjectStatementImpl() {
397 virtual ~SubjectStatementImpl() {}
399 SubjectStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
400 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
404 SubjectStatementImpl(const SubjectStatementImpl& src)
405 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
407 if (src.getSubject())
408 setSubject(src.getSubject()->cloneSubject());
411 IMPL_TYPED_CHILD(Subject);
414 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
415 PROC_TYPED_CHILD(Subject,SAML1_NS,true);
416 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
420 class SAML_DLLLOCAL SubjectLocalityImpl : public virtual SubjectLocality,
421 public AbstractSimpleElement,
422 public AbstractDOMCachingXMLObject,
423 public AbstractXMLObjectMarshaller,
424 public AbstractXMLObjectUnmarshaller
427 virtual ~SubjectLocalityImpl() {
428 XMLString::release(&m_IPAddress);
429 XMLString::release(&m_DNSAddress);
432 SubjectLocalityImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
433 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
437 SubjectLocalityImpl(const SubjectLocalityImpl& src)
438 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
440 setIPAddress(src.getIPAddress());
441 setDNSAddress(src.getDNSAddress());
445 m_IPAddress=m_DNSAddress=NULL;
448 IMPL_XMLOBJECT_CLONE(SubjectLocality);
449 IMPL_STRING_ATTRIB(IPAddress);
450 IMPL_STRING_ATTRIB(DNSAddress);
453 void marshallAttributes(DOMElement* domElement) const {
454 MARSHALL_STRING_ATTRIB(IPAddress,IPADDRESS,NULL);
455 MARSHALL_STRING_ATTRIB(DNSAddress,DNSADDRESS,NULL);
458 void processAttribute(const DOMAttr* attribute) {
459 PROC_STRING_ATTRIB(IPAddress,IPADDRESS,NULL);
460 PROC_STRING_ATTRIB(DNSAddress,DNSADDRESS,NULL);
464 class SAML_DLLLOCAL AuthorityBindingImpl : public virtual AuthorityBinding,
465 public AbstractSimpleElement,
466 public AbstractDOMCachingXMLObject,
467 public AbstractXMLObjectMarshaller,
468 public AbstractXMLObjectUnmarshaller
471 virtual ~AuthorityBindingImpl() {
472 delete m_AuthorityKind;
473 XMLString::release(&m_Location);
474 XMLString::release(&m_Binding);
477 AuthorityBindingImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
478 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
482 AuthorityBindingImpl(const AuthorityBindingImpl& src)
483 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
485 setAuthorityKind(src.getAuthorityKind());
486 setLocation(src.getLocation());
487 setBinding(src.getBinding());
491 m_AuthorityKind=NULL;
492 m_Location=m_Binding=NULL;
495 IMPL_XMLOBJECT_CLONE(AuthorityBinding);
496 IMPL_XMLOBJECT_ATTRIB(AuthorityKind,QName);
497 IMPL_STRING_ATTRIB(Location);
498 IMPL_STRING_ATTRIB(Binding);
501 void marshallAttributes(DOMElement* domElement) const {
502 MARSHALL_QNAME_ATTRIB(AuthorityKind,AUTHORITYKIND,NULL);
503 MARSHALL_STRING_ATTRIB(Location,LOCATION,NULL);
504 MARSHALL_STRING_ATTRIB(Binding,BINDING,NULL);
507 void processAttribute(const DOMAttr* attribute) {
508 PROC_QNAME_ATTRIB(AuthorityKind,AUTHORITYKIND,NULL);
509 PROC_STRING_ATTRIB(Location,LOCATION,NULL);
510 PROC_STRING_ATTRIB(Binding,BINDING,NULL);
514 class SAML_DLLLOCAL AuthenticationStatementImpl : public virtual AuthenticationStatement, public SubjectStatementImpl
517 virtual ~AuthenticationStatementImpl() {
518 XMLString::release(&m_AuthenticationMethod);
519 delete m_AuthenticationInstant;
522 AuthenticationStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
523 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
527 AuthenticationStatementImpl(const AuthenticationStatementImpl& src) : AbstractXMLObject(src), SubjectStatementImpl(src) {
529 setAuthenticationMethod(src.getAuthenticationMethod());
530 setAuthenticationInstant(src.getAuthenticationInstant());
531 if (src.getSubjectLocality())
532 setSubjectLocality(src.getSubjectLocality()->cloneSubjectLocality());
533 VectorOf(AuthorityBinding) v=getAuthorityBindings();
534 for (vector<AuthorityBinding*>::const_iterator i=src.m_AuthorityBindings.begin(); i!=src.m_AuthorityBindings.end(); i++) {
536 v.push_back((*i)->cloneAuthorityBinding());
542 m_AuthenticationMethod=NULL;
543 m_AuthenticationInstant=NULL;
544 m_SubjectLocality=NULL;
545 m_children.push_back(NULL);
546 m_pos_SubjectLocality=m_pos_Subject;
547 ++m_pos_SubjectLocality;
550 IMPL_XMLOBJECT_CLONE(AuthenticationStatement);
551 SubjectStatement* cloneSubjectStatement() const {
552 return cloneAuthenticationStatement();
554 Statement* cloneStatement() const {
555 return cloneAuthenticationStatement();
557 IMPL_STRING_ATTRIB(AuthenticationMethod);
558 IMPL_DATETIME_ATTRIB(AuthenticationInstant,0);
559 IMPL_TYPED_CHILD(SubjectLocality);
560 IMPL_TYPED_CHILDREN(AuthorityBinding, m_children.end());
563 void marshallAttributes(DOMElement* domElement) const {
564 MARSHALL_STRING_ATTRIB(AuthenticationMethod,AUTHENTICATIONMETHOD,NULL);
565 MARSHALL_DATETIME_ATTRIB(AuthenticationInstant,AUTHENTICATIONINSTANT,NULL);
566 SubjectStatementImpl::marshallAttributes(domElement);
569 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
570 PROC_TYPED_CHILD(SubjectLocality,SAML1_NS,false);
571 PROC_TYPED_CHILDREN(AuthorityBinding,SAML1_NS,false);
572 SubjectStatementImpl::processChildElement(childXMLObject,root);
575 void processAttribute(const DOMAttr* attribute) {
576 PROC_STRING_ATTRIB(AuthenticationMethod,AUTHENTICATIONMETHOD,NULL);
577 PROC_DATETIME_ATTRIB(AuthenticationInstant,AUTHENTICATIONINSTANT,NULL);
578 SubjectStatementImpl::processAttribute(attribute);
582 class SAML_DLLLOCAL ActionImpl : public virtual Action,
583 public AbstractSimpleElement,
584 public AbstractDOMCachingXMLObject,
585 public AbstractXMLObjectMarshaller,
586 public AbstractXMLObjectUnmarshaller
589 virtual ~ActionImpl() {
590 XMLString::release(&m_Namespace);
593 ActionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
594 : AbstractXMLObject(nsURI, localName, prefix, schemaType), m_Namespace(NULL) {
597 ActionImpl(const ActionImpl& src) : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
598 setNamespace(src.getNamespace());
601 IMPL_XMLOBJECT_CLONE(Action);
602 IMPL_STRING_ATTRIB(Namespace);
605 void marshallAttributes(DOMElement* domElement) const {
606 MARSHALL_STRING_ATTRIB(Namespace,NAMESPACE,NULL);
609 void processAttribute(const DOMAttr* attribute) {
610 PROC_STRING_ATTRIB(Namespace,NAMESPACE,NULL);
614 class SAML_DLLLOCAL EvidenceImpl : public virtual Evidence,
615 public AbstractComplexElement,
616 public AbstractDOMCachingXMLObject,
617 public AbstractXMLObjectMarshaller,
618 public AbstractXMLObjectUnmarshaller
621 virtual ~EvidenceImpl() {}
623 EvidenceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
624 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
627 EvidenceImpl(const EvidenceImpl& src)
628 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
629 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
631 AssertionIDReference* ref=dynamic_cast<AssertionIDReference*>(*i);
633 getAssertionIDReferences().push_back(ref->cloneAssertionIDReference());
637 Assertion* assertion=dynamic_cast<Assertion*>(*i);
639 getAssertions().push_back(assertion->cloneAssertion());
646 IMPL_XMLOBJECT_CLONE(Evidence);
647 IMPL_TYPED_CHILDREN(AssertionIDReference,m_children.end());
648 IMPL_TYPED_CHILDREN(Assertion,m_children.end());
651 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
652 PROC_TYPED_CHILDREN(AssertionIDReference,SAML1_NS,false);
653 PROC_TYPED_CHILDREN(Assertion,SAML1_NS,true);
654 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
658 class SAML_DLLLOCAL AuthorizationDecisionStatementImpl
659 : public virtual AuthorizationDecisionStatement, public SubjectStatementImpl
662 virtual ~AuthorizationDecisionStatementImpl() {
663 XMLString::release(&m_Resource);
664 XMLString::release(&m_Decision);
667 AuthorizationDecisionStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
668 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
672 AuthorizationDecisionStatementImpl(const AuthorizationDecisionStatementImpl& src)
673 : AbstractXMLObject(src), SubjectStatementImpl(src) {
675 setResource(src.getResource());
676 setDecision(src.getDecision());
677 if (src.getEvidence())
678 setEvidence(src.getEvidence()->cloneEvidence());
679 VectorOf(Action) v=getActions();
680 for (vector<Action*>::const_iterator i=src.m_Actions.begin(); i!=src.m_Actions.end(); i++) {
682 v.push_back((*i)->cloneAction());
691 m_children.push_back(NULL);
692 m_pos_Evidence=m_pos_Subject;
696 IMPL_XMLOBJECT_CLONE(AuthorizationDecisionStatement);
697 SubjectStatement* cloneSubjectStatement() const {
698 return cloneAuthorizationDecisionStatement();
700 Statement* cloneStatement() const {
701 return cloneAuthorizationDecisionStatement();
703 IMPL_STRING_ATTRIB(Resource);
704 IMPL_STRING_ATTRIB(Decision);
705 IMPL_TYPED_CHILD(Evidence);
706 IMPL_TYPED_CHILDREN(Action, m_pos_Evidence);
709 void marshallAttributes(DOMElement* domElement) const {
710 MARSHALL_STRING_ATTRIB(Resource,RESOURCE,NULL);
711 MARSHALL_STRING_ATTRIB(Decision,DECISION,NULL);
712 SubjectStatementImpl::marshallAttributes(domElement);
715 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
716 PROC_TYPED_CHILD(Evidence,SAML1_NS,false);
717 PROC_TYPED_CHILDREN(Action,SAML1_NS,false);
718 SubjectStatementImpl::processChildElement(childXMLObject,root);
721 void processAttribute(const DOMAttr* attribute) {
722 PROC_STRING_ATTRIB(Resource,RESOURCE,NULL);
723 PROC_STRING_ATTRIB(Decision,DECISION,NULL);
724 SubjectStatementImpl::processAttribute(attribute);
728 class SAML_DLLLOCAL AttributeDesignatorImpl : public virtual AttributeDesignator,
729 public AbstractSimpleElement,
730 public AbstractDOMCachingXMLObject,
731 public AbstractXMLObjectMarshaller,
732 public AbstractXMLObjectUnmarshaller
735 virtual ~AttributeDesignatorImpl() {
736 XMLString::release(&m_AttributeName);
737 XMLString::release(&m_AttributeNamespace);
740 AttributeDesignatorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
741 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
745 AttributeDesignatorImpl(const AttributeDesignatorImpl& src)
746 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
748 setAttributeName(src.getAttributeName());
749 setAttributeNamespace(src.getAttributeNamespace());
753 m_AttributeName=m_AttributeNamespace=NULL;
756 IMPL_XMLOBJECT_CLONE(AttributeDesignator);
757 IMPL_STRING_ATTRIB(AttributeName);
758 IMPL_STRING_ATTRIB(AttributeNamespace);
761 void marshallAttributes(DOMElement* domElement) const {
762 MARSHALL_STRING_ATTRIB(AttributeName,ATTRIBUTENAME,NULL);
763 MARSHALL_STRING_ATTRIB(AttributeNamespace,ATTRIBUTENAMESPACE,NULL);
766 void processAttribute(const DOMAttr* attribute) {
767 PROC_STRING_ATTRIB(AttributeName,ATTRIBUTENAME,NULL);
768 PROC_STRING_ATTRIB(AttributeNamespace,ATTRIBUTENAMESPACE,NULL);
772 class SAML_DLLLOCAL AttributeImpl : public virtual Attribute,
773 public AbstractComplexElement,
774 public AbstractDOMCachingXMLObject,
775 public AbstractXMLObjectMarshaller,
776 public AbstractXMLObjectUnmarshaller
779 virtual ~AttributeImpl() {
780 XMLString::release(&m_AttributeName);
781 XMLString::release(&m_AttributeNamespace);
784 AttributeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
785 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
789 AttributeImpl(const AttributeImpl& src)
790 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
792 setAttributeName(src.getAttributeName());
793 setAttributeNamespace(src.getAttributeNamespace());
794 VectorOf(XMLObject) v=getAttributeValues();
795 for (vector<XMLObject*>::const_iterator i=src.m_AttributeValues.begin(); i!=src.m_AttributeValues.end(); i++) {
797 v.push_back((*i)->clone());
803 m_AttributeName=m_AttributeNamespace=NULL;
806 IMPL_XMLOBJECT_CLONE(Attribute);
807 AttributeDesignator* cloneAttributeDesignator() const {
808 return cloneAttribute();
810 IMPL_STRING_ATTRIB(AttributeName);
811 IMPL_STRING_ATTRIB(AttributeNamespace);
812 IMPL_XMLOBJECT_CHILDREN(AttributeValue,m_children.end());
815 void marshallAttributes(DOMElement* domElement) const {
816 MARSHALL_STRING_ATTRIB(AttributeName,ATTRIBUTENAME,NULL);
817 MARSHALL_STRING_ATTRIB(AttributeNamespace,ATTRIBUTENAMESPACE,NULL);
820 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
821 getAttributeValues().push_back(childXMLObject);
824 void processAttribute(const DOMAttr* attribute) {
825 PROC_STRING_ATTRIB(AttributeName,ATTRIBUTENAME,NULL);
826 PROC_STRING_ATTRIB(AttributeNamespace,ATTRIBUTENAMESPACE,NULL);
830 class SAML_DLLLOCAL AttributeValueImpl : public virtual AttributeValue, public AnyElementImpl
833 virtual ~AttributeValueImpl() {}
835 AttributeValueImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
836 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
839 AttributeValueImpl(const AttributeValueImpl& src) : AnyElementImpl(src) {}
841 IMPL_XMLOBJECT_CLONE(AttributeValue);
844 class SAML_DLLLOCAL AttributeStatementImpl : public virtual AttributeStatement, public SubjectStatementImpl
847 virtual ~AttributeStatementImpl() {}
849 AttributeStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
850 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
853 AttributeStatementImpl(const AttributeStatementImpl& src)
854 : AbstractXMLObject(src), SubjectStatementImpl(src) {
855 VectorOf(Attribute) v=getAttributes();
856 for (vector<Attribute*>::const_iterator i=src.m_Attributes.begin(); i!=src.m_Attributes.end(); i++) {
858 v.push_back((*i)->cloneAttribute());
863 IMPL_XMLOBJECT_CLONE(AttributeStatement);
864 SubjectStatement* cloneSubjectStatement() const {
865 return cloneAttributeStatement();
867 Statement* cloneStatement() const {
868 return cloneAttributeStatement();
870 IMPL_TYPED_CHILDREN(Attribute, m_children.end());
873 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
874 PROC_TYPED_CHILDREN(Attribute,SAML1_NS,true);
875 SubjectStatementImpl::processChildElement(childXMLObject,root);
879 class SAML_DLLLOCAL AdviceImpl : public virtual Advice,
880 public AbstractComplexElement,
881 public AbstractDOMCachingXMLObject,
882 public AbstractXMLObjectMarshaller,
883 public AbstractXMLObjectUnmarshaller
886 virtual ~AdviceImpl() {}
888 AdviceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
889 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
892 AdviceImpl(const AdviceImpl& src)
893 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
894 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
896 AssertionIDReference* ref=dynamic_cast<AssertionIDReference*>(*i);
898 getAssertionIDReferences().push_back(ref->cloneAssertionIDReference());
902 Assertion* assertion=dynamic_cast<Assertion*>(*i);
904 getAssertions().push_back(assertion->cloneAssertion());
908 getUnknownXMLObjects().push_back((*i)->clone());
913 IMPL_XMLOBJECT_CLONE(Advice);
914 IMPL_TYPED_CHILDREN(AssertionIDReference,m_children.end());
915 IMPL_TYPED_CHILDREN(Assertion,m_children.end());
916 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
919 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
920 PROC_TYPED_CHILDREN(AssertionIDReference,SAML1_NS,false);
921 PROC_TYPED_CHILDREN(Assertion,SAML1_NS,true);
924 const XMLCh* nsURI=root->getNamespaceURI();
925 if (!XMLString::equals(nsURI,SAML1_NS) && nsURI && *nsURI) {
926 getUnknownXMLObjects().push_back(childXMLObject);
930 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
934 class SAML_DLLLOCAL AssertionImpl : public virtual Assertion,
935 public AbstractComplexElement,
936 public AbstractDOMCachingXMLObject,
937 public AbstractXMLObjectMarshaller,
938 public AbstractXMLObjectUnmarshaller
945 m_children.push_back(NULL);
946 m_children.push_back(NULL);
947 m_children.push_back(NULL);
951 m_pos_Conditions=m_children.begin();
952 m_pos_Advice=m_pos_Conditions;
954 m_pos_Signature=m_pos_Advice;
958 virtual ~AssertionImpl() {
959 XMLString::release(&m_MinorVersion);
960 XMLString::release(&m_AssertionID);
961 XMLString::release(&m_Issuer);
962 delete m_IssueInstant;
965 AssertionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
966 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
970 AssertionImpl(const AssertionImpl& src)
971 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
973 setMinorVersion(src.m_MinorVersion);
974 setAssertionID(src.getAssertionID());
975 setIssuer(src.getIssuer());
976 setIssueInstant(src.getIssueInstant());
977 if (src.getConditions())
978 setConditions(src.getConditions()->cloneConditions());
980 setAdvice(src.getAdvice()->cloneAdvice());
981 if (src.getSignature())
982 setSignature(src.getSignature()->cloneSignature());
983 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
985 AuthenticationStatement* authst=dynamic_cast<AuthenticationStatement*>(*i);
987 getAuthenticationStatements().push_back(authst->cloneAuthenticationStatement());
991 AttributeStatement* attst=dynamic_cast<AttributeStatement*>(*i);
993 getAttributeStatements().push_back(attst->cloneAttributeStatement());
997 AuthorizationDecisionStatement* authzst=dynamic_cast<AuthorizationDecisionStatement*>(*i);
999 getAuthorizationDecisionStatements().push_back(authzst->cloneAuthorizationDecisionStatement());
1003 SubjectStatement* subst=dynamic_cast<SubjectStatement*>(*i);
1005 getSubjectStatements().push_back(subst->cloneSubjectStatement());
1009 Statement* st=dynamic_cast<Statement*>(*i);
1011 getStatements().push_back(st->cloneStatement());
1018 //IMPL_TYPED_CHILD(Signature);
1019 // Need customized setter.
1021 Signature* m_Signature;
1022 list<XMLObject*>::iterator m_pos_Signature;
1024 Signature* getSignature() const {
1028 void setSignature(Signature* sig) {
1029 prepareForAssignment(m_Signature,sig);
1030 *m_pos_Signature=m_Signature=sig;
1031 // Sync content reference back up.
1033 m_Signature->setContentReference(new opensaml::ContentReference(*this));
1036 IMPL_XMLOBJECT_CLONE(Assertion);
1037 IMPL_INTEGER_ATTRIB(MinorVersion);
1038 IMPL_STRING_ATTRIB(AssertionID); // have to special-case getXMLID
1039 const XMLCh* getXMLID() const {
1040 pair<bool,int> v = getMinorVersion();
1041 return (!v.first || v.second > 0) ? m_AssertionID : NULL;
1043 const XMLCh* getID() const {
1044 return getAssertionID();
1046 IMPL_STRING_ATTRIB(Issuer);
1047 IMPL_DATETIME_ATTRIB(IssueInstant,0);
1048 IMPL_TYPED_CHILD(Conditions);
1049 IMPL_TYPED_CHILD(Advice);
1050 IMPL_TYPED_CHILDREN(Statement, m_pos_Signature);
1051 IMPL_TYPED_CHILDREN(SubjectStatement, m_pos_Signature);
1052 IMPL_TYPED_CHILDREN(AuthenticationStatement, m_pos_Signature);
1053 IMPL_TYPED_CHILDREN(AttributeStatement, m_pos_Signature);
1054 IMPL_TYPED_CHILDREN(AuthorizationDecisionStatement, m_pos_Signature);
1057 void marshallAttributes(DOMElement* domElement) const {
1058 static const XMLCh MAJORVERSION[] = UNICODE_LITERAL_12(M,a,j,o,r,V,e,r,s,i,o,n);
1059 domElement->setAttributeNS(NULL,MAJORVERSION,XML_ONE);
1060 if (!m_MinorVersion)
1061 const_cast<AssertionImpl*>(this)->m_MinorVersion=XMLString::replicate(XML_ONE);
1062 MARSHALL_INTEGER_ATTRIB(MinorVersion,MINORVERSION,NULL);
1064 const_cast<AssertionImpl*>(this)->m_AssertionID=SAMLConfig::getConfig().generateIdentifier();
1065 domElement->setAttributeNS(NULL, ASSERTIONID_ATTRIB_NAME, m_AssertionID);
1066 if (*m_MinorVersion!=chDigit_0)
1067 domElement->setIdAttributeNS(NULL, ASSERTIONID_ATTRIB_NAME);
1068 MARSHALL_STRING_ATTRIB(Issuer,ISSUER,NULL);
1069 if (!m_IssueInstant) {
1070 const_cast<AssertionImpl*>(this)->m_IssueInstantEpoch=time(NULL);
1071 const_cast<AssertionImpl*>(this)->m_IssueInstant=new DateTime(m_IssueInstantEpoch);
1073 MARSHALL_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,NULL);
1076 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1077 PROC_TYPED_CHILD(Conditions,SAML1_NS,false);
1078 PROC_TYPED_CHILD(Advice,SAML1_NS,false);
1079 PROC_TYPED_CHILD(Signature,XMLSIG_NS,false);
1080 PROC_TYPED_CHILDREN(AuthenticationStatement,SAML1_NS,false);
1081 PROC_TYPED_CHILDREN(AttributeStatement,SAML1_NS,false);
1082 PROC_TYPED_CHILDREN(AuthorizationDecisionStatement,SAML1_NS,false);
1083 PROC_TYPED_CHILDREN(SubjectStatement,SAML1_NS,true);
1084 PROC_TYPED_CHILDREN(Statement,SAML1_NS,true);
1085 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1088 void unmarshallAttributes(const DOMElement* domElement) {
1089 // Standard processing, but then we check IDness.
1090 AbstractXMLObjectUnmarshaller::unmarshallAttributes(domElement);
1091 if (m_AssertionID && (!m_MinorVersion || *m_MinorVersion!=chDigit_0))
1092 const_cast<DOMElement*>(domElement)->setIdAttributeNS(NULL, ASSERTIONID_ATTRIB_NAME);
1095 void processAttribute(const DOMAttr* attribute) {
1096 static const XMLCh MAJORVERSION[] = UNICODE_LITERAL_12(M,a,j,o,r,V,e,r,s,i,o,n);
1097 if (XMLHelper::isNodeNamed(attribute,NULL,MAJORVERSION)) {
1098 if (!XMLString::equals(attribute->getValue(),XML_ONE))
1099 throw UnmarshallingException("Assertion has invalid major version.");
1101 PROC_INTEGER_ATTRIB(MinorVersion,MINORVERSION,NULL);
1102 PROC_STRING_ATTRIB(AssertionID,ASSERTIONID,NULL);
1103 PROC_STRING_ATTRIB(Issuer,ISSUER,NULL);
1104 PROC_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,NULL);
1111 #if defined (_MSC_VER)
1112 #pragma warning( pop )
1115 // Builder Implementations
1117 IMPL_XMLOBJECTBUILDER(Action);
1118 IMPL_XMLOBJECTBUILDER(Advice);
1119 IMPL_XMLOBJECTBUILDER(Assertion);
1120 IMPL_XMLOBJECTBUILDER(AssertionIDReference);
1121 IMPL_XMLOBJECTBUILDER(Attribute);
1122 IMPL_XMLOBJECTBUILDER(AttributeDesignator);
1123 IMPL_XMLOBJECTBUILDER(AttributeStatement);
1124 IMPL_XMLOBJECTBUILDER(AttributeValue);
1125 IMPL_XMLOBJECTBUILDER(Audience);
1126 IMPL_XMLOBJECTBUILDER(AudienceRestrictionCondition);
1127 IMPL_XMLOBJECTBUILDER(AuthenticationStatement);
1128 IMPL_XMLOBJECTBUILDER(AuthorizationDecisionStatement);
1129 IMPL_XMLOBJECTBUILDER(AuthorityBinding);
1130 IMPL_XMLOBJECTBUILDER(Condition);
1131 IMPL_XMLOBJECTBUILDER(Conditions);
1132 IMPL_XMLOBJECTBUILDER(ConfirmationMethod);
1133 IMPL_XMLOBJECTBUILDER(DoNotCacheCondition);
1134 IMPL_XMLOBJECTBUILDER(Evidence);
1135 IMPL_XMLOBJECTBUILDER(NameIdentifier);
1136 IMPL_XMLOBJECTBUILDER(Statement);
1137 IMPL_XMLOBJECTBUILDER(Subject);
1138 IMPL_XMLOBJECTBUILDER(SubjectConfirmation);
1139 IMPL_XMLOBJECTBUILDER(SubjectConfirmationData);
1140 IMPL_XMLOBJECTBUILDER(SubjectLocality);
1143 const XMLCh Action::LOCAL_NAME[] = UNICODE_LITERAL_6(A,c,t,i,o,n);
1144 const XMLCh Action::TYPE_NAME[] = UNICODE_LITERAL_10(A,c,t,i,o,n,T,y,p,e);
1145 const XMLCh Action::NAMESPACE_ATTRIB_NAME[] = UNICODE_LITERAL_9(N,a,m,e,s,p,a,c,e);
1146 const XMLCh Advice::LOCAL_NAME[] = UNICODE_LITERAL_6(A,d,v,i,c,e);
1147 const XMLCh Advice::TYPE_NAME[] = UNICODE_LITERAL_10(A,d,v,i,c,e,T,y,p,e);
1148 const XMLCh Assertion::LOCAL_NAME[] = UNICODE_LITERAL_9(A,s,s,e,r,t,i,o,n);
1149 const XMLCh Assertion::TYPE_NAME[] = UNICODE_LITERAL_13(A,s,s,e,r,t,i,o,n,T,y,p,e);
1150 const XMLCh Assertion::MINORVERSION_ATTRIB_NAME[] = UNICODE_LITERAL_12(M,i,n,o,r,V,e,r,s,i,o,n);
1151 const XMLCh Assertion::ASSERTIONID_ATTRIB_NAME[] = UNICODE_LITERAL_11(A,s,s,e,r,t,i,o,n,I,D);
1152 const XMLCh Assertion::ISSUER_ATTRIB_NAME[] = UNICODE_LITERAL_6(I,s,s,u,e,r);
1153 const XMLCh Assertion::ISSUEINSTANT_ATTRIB_NAME[] = UNICODE_LITERAL_12(I,s,s,u,e,I,n,s,t,a,n,t);
1154 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);
1155 const XMLCh Attribute::LOCAL_NAME[] = UNICODE_LITERAL_9(A,t,t,r,i,b,u,t,e);
1156 const XMLCh Attribute::TYPE_NAME[] = UNICODE_LITERAL_13(A,t,t,r,i,b,u,t,e,T,y,p,e);
1157 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);
1158 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);
1159 const XMLCh AttributeDesignator::ATTRIBUTENAME_ATTRIB_NAME[] = UNICODE_LITERAL_13(A,t,t,r,i,b,u,t,e,N,a,m,e);
1160 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);
1161 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);
1162 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);
1163 const XMLCh AttributeValue::LOCAL_NAME[] = UNICODE_LITERAL_14(A,t,t,r,i,b,u,t,e,V,a,l,u,e);
1164 const XMLCh Audience::LOCAL_NAME[] = UNICODE_LITERAL_8(A,u,d,i,e,n,c,e);
1165 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);
1166 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);
1167 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);
1168 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);
1169 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);
1170 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);
1171 const XMLCh AuthorityBinding::LOCAL_NAME[] = UNICODE_LITERAL_16(A,u,t,h,o,r,i,t,y,B,i,n,d,i,n,g);
1172 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);
1173 const XMLCh AuthorityBinding::AUTHORITYKIND_ATTRIB_NAME[] = UNICODE_LITERAL_13(A,u,t,h,o,r,i,t,y,K,i,n,d);
1174 const XMLCh AuthorityBinding::LOCATION_ATTRIB_NAME[] = UNICODE_LITERAL_8(L,o,c,a,t,i,o,n);
1175 const XMLCh AuthorityBinding::BINDING_ATTRIB_NAME[] = UNICODE_LITERAL_7(B,i,n,d,i,n,g);
1176 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);
1177 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);
1178 const XMLCh AuthorizationDecisionStatement::RESOURCE_ATTRIB_NAME[] = UNICODE_LITERAL_8(R,e,s,o,u,r,c,e);
1179 const XMLCh AuthorizationDecisionStatement::DECISION_ATTRIB_NAME[] = UNICODE_LITERAL_8(D,e,c,i,s,i,o,n);
1180 const XMLCh AuthorizationDecisionStatement::DECISION_PERMIT[] = UNICODE_LITERAL_6(P,e,r,m,i,t);
1181 const XMLCh AuthorizationDecisionStatement::DECISION_DENY[] = UNICODE_LITERAL_4(D,e,n,y);
1182 const XMLCh AuthorizationDecisionStatement::DECISION_INDETERMINATE[] = UNICODE_LITERAL_13(I,n,d,e,t,e,r,m,i,n,a,t,e);
1183 const XMLCh Condition::LOCAL_NAME[] = UNICODE_LITERAL_9(C,o,n,d,i,t,i,o,n);
1184 const XMLCh Conditions::LOCAL_NAME[] = UNICODE_LITERAL_10(C,o,n,d,i,t,i,o,n,s);
1185 const XMLCh Conditions::TYPE_NAME[] = UNICODE_LITERAL_14(C,o,n,d,i,t,i,o,n,s,T,y,p,e);
1186 const XMLCh Conditions::NOTBEFORE_ATTRIB_NAME[] = UNICODE_LITERAL_9(N,o,t,B,e,f,o,r,e);
1187 const XMLCh Conditions::NOTONORAFTER_ATTRIB_NAME[] =UNICODE_LITERAL_12(N,o,t,O,n,O,r,A,f,t,e,r);
1188 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);
1189 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);
1190 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);
1191 const XMLCh Evidence::LOCAL_NAME[] = UNICODE_LITERAL_8(E,v,i,d,e,n,c,e);
1192 const XMLCh Evidence::TYPE_NAME[] = UNICODE_LITERAL_12(E,v,i,d,e,n,c,e,T,y,p,e);
1193 const XMLCh NameIdentifier::LOCAL_NAME[] = UNICODE_LITERAL_14(N,a,m,e,I,d,e,n,t,i,f,i,e,r);
1194 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);
1195 const XMLCh NameIdentifier::NAMEQUALIFIER_ATTRIB_NAME[] = UNICODE_LITERAL_13(N,a,m,e,Q,u,a,l,i,f,i,e,r);
1196 const XMLCh NameIdentifier::FORMAT_ATTRIB_NAME[] = UNICODE_LITERAL_6(F,o,r,m,a,t);
1197 const XMLCh Statement::LOCAL_NAME[] = UNICODE_LITERAL_9(S,t,a,t,e,m,e,n,t);
1198 const XMLCh Subject::LOCAL_NAME[] = UNICODE_LITERAL_7(S,u,b,j,e,c,t);
1199 const XMLCh Subject::TYPE_NAME[] = UNICODE_LITERAL_11(S,u,b,j,e,c,t,T,y,p,e);
1200 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);
1201 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);
1202 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);
1203 const XMLCh SubjectLocality::LOCAL_NAME[] = UNICODE_LITERAL_15(S,u,b,j,e,c,t,L,o,c,a,l,i,t,y);
1204 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);
1205 const XMLCh SubjectLocality::IPADDRESS_ATTRIB_NAME[] = UNICODE_LITERAL_9(I,P,A,d,d,r,e,s,s);
1206 const XMLCh SubjectLocality::DNSADDRESS_ATTRIB_NAME[] = UNICODE_LITERAL_10(D,N,S,A,d,d,r,e,s,s);
1207 const XMLCh SubjectStatement::LOCAL_NAME[] = UNICODE_LITERAL_16(S,u,b,j,e,c,t,S,t,a,t,e,m,e,n,t);
1209 const XMLCh NameIdentifier::UNSPECIFIED[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified
1210 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1211 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1212 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1213 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1214 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1215 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
1218 const XMLCh NameIdentifier::EMAIL[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress
1219 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1220 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1221 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1222 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1223 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1224 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
1227 const XMLCh NameIdentifier::X509_SUBJECT[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName
1228 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1229 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1230 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1231 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1232 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1233 chLatin_X, chDigit_5, chDigit_0, chDigit_9, chLatin_S, chLatin_u, chLatin_b, chLatin_j, chLatin_e, chLatin_c, chLatin_t,
1234 chLatin_N, chLatin_a, chLatin_m, chLatin_e, chNull
1237 const XMLCh NameIdentifier::WIN_DOMAIN_QUALIFIED[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName
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_W, chLatin_i, chLatin_n, chLatin_d, chLatin_o, chLatin_w, chLatin_s,
1244 chLatin_D, chLatin_o, chLatin_m, chLatin_a, chLatin_i, chLatin_n,
1245 chLatin_Q, chLatin_u, chLatin_a, chLatin_l, chLatin_i, chLatin_f, chLatin_i, chLatin_e, chLatin_d,
1246 chLatin_N, chLatin_a, chLatin_m, chLatin_e, chNull
1249 const XMLCh SubjectConfirmation::ARTIFACT01[] = // urn:oasis:names:tc:SAML:1.0:cm:artifact-01
1250 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1251 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1252 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1253 chLatin_c, chLatin_m, chColon, chLatin_a, chLatin_r, chLatin_t, chLatin_i, chLatin_f, chLatin_a, chLatin_c, chLatin_t,
1254 chDash, chDigit_0, chDigit_1, chNull
1257 const XMLCh SubjectConfirmation::ARTIFACT[] = // urn:oasis:names:tc:SAML:1.0:cm:artifact
1258 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1259 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1260 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1261 chLatin_c, chLatin_m, chColon, chLatin_a, chLatin_r, chLatin_t, chLatin_i, chLatin_f, chLatin_a, chLatin_c, chLatin_t, chNull
1264 const XMLCh SubjectConfirmation::BEARER[] = // urn:oasis:names:tc:SAML:1.0:cm:bearer
1265 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1266 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1267 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1268 chLatin_c, chLatin_m, chColon, chLatin_b, chLatin_e, chLatin_a, chLatin_r, chLatin_e, chLatin_r, chNull
1271 const XMLCh SubjectConfirmation::HOLDER_KEY[] = // urn:oasis:names:tc:SAML:1.0:cm:holder-of-key
1272 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1273 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1274 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1275 chLatin_c, chLatin_m, chColon, chLatin_h, chLatin_o, chLatin_l, chLatin_d, chLatin_e, chLatin_r, chDash,
1276 chLatin_o, chLatin_f, chDash, chLatin_k, chLatin_e, chLatin_y, chNull
1279 const XMLCh SubjectConfirmation::SENDER_VOUCHES[] = // urn:oasis:names:tc:SAML:1.0:cm:sender-vouches
1280 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1281 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1282 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1283 chLatin_c, chLatin_m, chColon, chLatin_s, chLatin_e, chLatin_n, chLatin_d, chLatin_e, chLatin_r, chDash,
1284 chLatin_v, chLatin_o, chLatin_u, chLatin_c, chLatin_h, chLatin_e, chLatin_s, chNull
1287 const XMLCh Action::RWEDC_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:rwedc
1288 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1289 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1290 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1291 chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1292 chLatin_r, chLatin_w, chLatin_e, chLatin_d, chLatin_c, chNull
1295 const XMLCh Action::RWEDC_NEG_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:rwedc-negation
1296 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1297 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1298 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1299 chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1300 chLatin_r, chLatin_w, chLatin_e, chLatin_d, chLatin_c, chDash,
1301 chLatin_n, chLatin_e, chLatin_g, chLatin_a, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chNull
1304 const XMLCh Action::GHPP_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:ghpp
1305 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1306 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1307 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1308 chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1309 chLatin_g, chLatin_h, chLatin_p, chLatin_p, chNull
1312 const XMLCh Action::UNIX_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:unix
1313 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1314 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1315 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1316 chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1317 chLatin_u, chLatin_n, chLatin_i, chLatin_x, chNull