2 * Copyright 2001-2006 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 opensaml;
40 using namespace xmlsignature;
41 using namespace xmltooling;
43 using xmlconstants::XMLSIG_NS;
44 using xmlconstants::XML_ONE;
45 using samlconstants::SAML1_NS;
47 #if defined (_MSC_VER)
48 #pragma warning( push )
49 #pragma warning( disable : 4250 4251 )
55 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AssertionIDReference);
56 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,Audience);
57 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,ConfirmationMethod);
59 class SAML_DLLLOCAL AudienceRestrictionConditionImpl : public virtual AudienceRestrictionCondition,
60 public AbstractComplexElement,
61 public AbstractDOMCachingXMLObject,
62 public AbstractXMLObjectMarshaller,
63 public AbstractXMLObjectUnmarshaller
66 virtual ~AudienceRestrictionConditionImpl() {}
68 AudienceRestrictionConditionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
69 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
72 AudienceRestrictionConditionImpl(const AudienceRestrictionConditionImpl& src)
73 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
74 VectorOf(Audience) v=getAudiences();
75 for (vector<Audience*>::const_iterator i=src.m_Audiences.begin(); i!=src.m_Audiences.end(); i++) {
77 v.push_back((*i)->cloneAudience());
82 IMPL_XMLOBJECT_CLONE(AudienceRestrictionCondition);
83 Condition* cloneCondition() const {
84 return cloneAudienceRestrictionCondition();
86 IMPL_TYPED_CHILDREN(Audience,m_children.end());
89 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
90 PROC_TYPED_CHILDREN(Audience,SAML1_NS,false);
91 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
95 class SAML_DLLLOCAL DoNotCacheConditionImpl : public virtual DoNotCacheCondition,
96 public AbstractSimpleElement,
97 public AbstractDOMCachingXMLObject,
98 public AbstractXMLObjectMarshaller,
99 public AbstractXMLObjectUnmarshaller
102 virtual ~DoNotCacheConditionImpl() {}
104 DoNotCacheConditionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
105 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
108 DoNotCacheConditionImpl(const DoNotCacheConditionImpl& src)
109 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
112 IMPL_XMLOBJECT_CLONE(DoNotCacheCondition);
113 Condition* cloneCondition() const {
114 return cloneDoNotCacheCondition();
118 class SAML_DLLLOCAL ConditionsImpl : public virtual Conditions,
119 public AbstractComplexElement,
120 public AbstractDOMCachingXMLObject,
121 public AbstractXMLObjectMarshaller,
122 public AbstractXMLObjectUnmarshaller
125 virtual ~ConditionsImpl() {
127 delete m_NotOnOrAfter;
130 ConditionsImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
131 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
135 ConditionsImpl(const ConditionsImpl& src)
136 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
138 setNotBefore(src.getNotBefore());
139 setNotOnOrAfter(src.getNotOnOrAfter());
141 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
143 AudienceRestrictionCondition* arc=dynamic_cast<AudienceRestrictionCondition*>(*i);
145 getAudienceRestrictionConditions().push_back(arc->cloneAudienceRestrictionCondition());
149 DoNotCacheCondition* dncc=dynamic_cast<DoNotCacheCondition*>(*i);
151 getDoNotCacheConditions().push_back(dncc->cloneDoNotCacheCondition());
155 Condition* c=dynamic_cast<Condition*>(*i);
157 getConditions().push_back(c->cloneCondition());
165 m_NotBefore=m_NotOnOrAfter=NULL;
168 IMPL_XMLOBJECT_CLONE(Conditions);
169 IMPL_DATETIME_ATTRIB(NotBefore,0);
170 IMPL_DATETIME_ATTRIB(NotOnOrAfter,SAMLTIME_MAX);
171 IMPL_TYPED_CHILDREN(AudienceRestrictionCondition, m_children.end());
172 IMPL_TYPED_CHILDREN(DoNotCacheCondition,m_children.end());
173 IMPL_TYPED_CHILDREN(Condition,m_children.end());
176 void marshallAttributes(DOMElement* domElement) const {
177 MARSHALL_DATETIME_ATTRIB(NotBefore,NOTBEFORE,NULL);
178 MARSHALL_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,NULL);
181 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
182 PROC_TYPED_CHILDREN(AudienceRestrictionCondition,SAML1_NS,true);
183 PROC_TYPED_CHILDREN(DoNotCacheCondition,SAML1_NS,true);
184 PROC_TYPED_CHILDREN(Condition,SAML1_NS,true);
185 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
188 void processAttribute(const DOMAttr* attribute) {
189 PROC_DATETIME_ATTRIB(NotBefore,NOTBEFORE,NULL);
190 PROC_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,NULL);
194 class SAML_DLLLOCAL NameIdentifierImpl : public virtual NameIdentifier,
195 public AbstractSimpleElement,
196 public AbstractDOMCachingXMLObject,
197 public AbstractXMLObjectMarshaller,
198 public AbstractXMLObjectUnmarshaller
201 virtual ~NameIdentifierImpl() {
202 XMLString::release(&m_Format);
203 XMLString::release(&m_NameQualifier);
206 NameIdentifierImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
207 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
211 NameIdentifierImpl(const NameIdentifierImpl& src)
212 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
214 setFormat(src.getFormat());
215 setNameQualifier(src.getNameQualifier());
219 m_Format=m_NameQualifier=NULL;
222 IMPL_XMLOBJECT_CLONE(NameIdentifier);
223 IMPL_STRING_ATTRIB(Format);
224 IMPL_STRING_ATTRIB(NameQualifier);
227 void marshallAttributes(DOMElement* domElement) const {
228 MARSHALL_STRING_ATTRIB(Format,FORMAT,NULL);
229 MARSHALL_STRING_ATTRIB(NameQualifier,NAMEQUALIFIER,NULL);
232 void processAttribute(const DOMAttr* attribute) {
233 PROC_STRING_ATTRIB(Format,FORMAT,NULL);
234 PROC_STRING_ATTRIB(NameQualifier,NAMEQUALIFIER,NULL);
238 class SAML_DLLLOCAL SubjectConfirmationDataImpl : public virtual SubjectConfirmationData, public AnyElementImpl
241 virtual ~SubjectConfirmationDataImpl() {}
243 SubjectConfirmationDataImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
244 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
247 SubjectConfirmationDataImpl(const SubjectConfirmationDataImpl& src) : AnyElementImpl(src) {
250 IMPL_XMLOBJECT_CLONE(SubjectConfirmationData);
253 class SAML_DLLLOCAL SubjectConfirmationImpl : public virtual SubjectConfirmation,
254 public AbstractComplexElement,
255 public AbstractDOMCachingXMLObject,
256 public AbstractXMLObjectMarshaller,
257 public AbstractXMLObjectUnmarshaller
260 virtual ~SubjectConfirmationImpl() {}
262 SubjectConfirmationImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
263 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
267 SubjectConfirmationImpl(const SubjectConfirmationImpl& src)
268 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
270 if (src.getSubjectConfirmationData())
271 setSubjectConfirmationData(src.getSubjectConfirmationData()->clone());
272 if (src.getKeyInfo())
273 setKeyInfo(src.getKeyInfo()->cloneKeyInfo());
274 VectorOf(ConfirmationMethod) v=getConfirmationMethods();
275 for (vector<ConfirmationMethod*>::const_iterator i=src.m_ConfirmationMethods.begin(); i!=src.m_ConfirmationMethods.end(); i++) {
277 v.push_back((*i)->cloneConfirmationMethod());
283 m_SubjectConfirmationData=NULL;
285 m_children.push_back(NULL);
286 m_children.push_back(NULL);
287 m_pos_SubjectConfirmationData=m_children.begin();
288 m_pos_KeyInfo=m_pos_SubjectConfirmationData;
292 IMPL_XMLOBJECT_CLONE(SubjectConfirmation);
293 IMPL_TYPED_CHILDREN(ConfirmationMethod,m_pos_SubjectConfirmationData);
294 IMPL_XMLOBJECT_CHILD(SubjectConfirmationData);
295 IMPL_TYPED_CHILD(KeyInfo);
298 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
299 PROC_TYPED_CHILDREN(ConfirmationMethod,SAML1_NS,false);
300 PROC_TYPED_CHILD(KeyInfo,XMLSIG_NS,false);
302 // Anything else we'll assume is the data.
303 if (getSubjectConfirmationData())
304 throw UnmarshallingException("Invalid child element: $1",params(1,childXMLObject->getElementQName().toString().c_str()));
305 setSubjectConfirmationData(childXMLObject);
309 class SAML_DLLLOCAL SubjectImpl : public virtual Subject,
310 public AbstractComplexElement,
311 public AbstractDOMCachingXMLObject,
312 public AbstractXMLObjectMarshaller,
313 public AbstractXMLObjectUnmarshaller
316 virtual ~SubjectImpl() {}
318 SubjectImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
319 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
323 SubjectImpl(const SubjectImpl& src)
324 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
326 if (src.getNameIdentifier())
327 setNameIdentifier(src.getNameIdentifier()->cloneNameIdentifier());
328 if (src.getSubjectConfirmation())
329 setSubjectConfirmation(src.getSubjectConfirmation()->cloneSubjectConfirmation());
333 m_NameIdentifier=NULL;
334 m_SubjectConfirmation=NULL;
335 m_children.push_back(NULL);
336 m_children.push_back(NULL);
337 m_pos_NameIdentifier=m_children.begin();
338 m_pos_SubjectConfirmation=m_pos_NameIdentifier;
339 ++m_pos_SubjectConfirmation;
342 IMPL_XMLOBJECT_CLONE(Subject);
343 IMPL_TYPED_CHILD(NameIdentifier);
344 IMPL_TYPED_CHILD(SubjectConfirmation);
347 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
348 PROC_TYPED_CHILD(NameIdentifier,SAML1_NS,true);
349 PROC_TYPED_CHILD(SubjectConfirmation,SAML1_NS,true);
350 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
354 class SAML_DLLLOCAL SubjectStatementImpl : public virtual SubjectStatement,
355 public AbstractComplexElement,
356 public AbstractDOMCachingXMLObject,
357 public AbstractXMLObjectMarshaller,
358 public AbstractXMLObjectUnmarshaller
362 m_children.push_back(NULL);
363 m_pos_Subject=m_children.begin();
366 SubjectStatementImpl() {
370 virtual ~SubjectStatementImpl() {}
372 SubjectStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
373 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
377 SubjectStatementImpl(const SubjectStatementImpl& src)
378 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
380 if (src.getSubject())
381 setSubject(src.getSubject()->cloneSubject());
384 IMPL_TYPED_CHILD(Subject);
387 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
388 PROC_TYPED_CHILD(Subject,SAML1_NS,true);
389 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
393 class SAML_DLLLOCAL SubjectLocalityImpl : public virtual SubjectLocality,
394 public AbstractSimpleElement,
395 public AbstractDOMCachingXMLObject,
396 public AbstractXMLObjectMarshaller,
397 public AbstractXMLObjectUnmarshaller
400 virtual ~SubjectLocalityImpl() {
401 XMLString::release(&m_IPAddress);
402 XMLString::release(&m_DNSAddress);
405 SubjectLocalityImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
406 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
410 SubjectLocalityImpl(const SubjectLocalityImpl& src)
411 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
413 setIPAddress(src.getIPAddress());
414 setDNSAddress(src.getDNSAddress());
418 m_IPAddress=m_DNSAddress=NULL;
421 IMPL_XMLOBJECT_CLONE(SubjectLocality);
422 IMPL_STRING_ATTRIB(IPAddress);
423 IMPL_STRING_ATTRIB(DNSAddress);
426 void marshallAttributes(DOMElement* domElement) const {
427 MARSHALL_STRING_ATTRIB(IPAddress,IPADDRESS,NULL);
428 MARSHALL_STRING_ATTRIB(DNSAddress,DNSADDRESS,NULL);
431 void processAttribute(const DOMAttr* attribute) {
432 PROC_STRING_ATTRIB(IPAddress,IPADDRESS,NULL);
433 PROC_STRING_ATTRIB(DNSAddress,DNSADDRESS,NULL);
437 class SAML_DLLLOCAL AuthorityBindingImpl : public virtual AuthorityBinding,
438 public AbstractSimpleElement,
439 public AbstractDOMCachingXMLObject,
440 public AbstractXMLObjectMarshaller,
441 public AbstractXMLObjectUnmarshaller
444 virtual ~AuthorityBindingImpl() {
445 delete m_AuthorityKind;
446 XMLString::release(&m_Location);
447 XMLString::release(&m_Binding);
450 AuthorityBindingImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
451 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
455 AuthorityBindingImpl(const AuthorityBindingImpl& src)
456 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
458 setAuthorityKind(src.getAuthorityKind());
459 setLocation(src.getLocation());
460 setBinding(src.getBinding());
464 m_AuthorityKind=NULL;
465 m_Location=m_Binding=NULL;
468 IMPL_XMLOBJECT_CLONE(AuthorityBinding);
469 IMPL_XMLOBJECT_ATTRIB(AuthorityKind,QName);
470 IMPL_STRING_ATTRIB(Location);
471 IMPL_STRING_ATTRIB(Binding);
474 void marshallAttributes(DOMElement* domElement) const {
475 MARSHALL_QNAME_ATTRIB(AuthorityKind,AUTHORITYKIND,NULL);
476 MARSHALL_STRING_ATTRIB(Location,LOCATION,NULL);
477 MARSHALL_STRING_ATTRIB(Binding,BINDING,NULL);
480 void processAttribute(const DOMAttr* attribute) {
481 PROC_QNAME_ATTRIB(AuthorityKind,AUTHORITYKIND,NULL);
482 PROC_STRING_ATTRIB(Location,LOCATION,NULL);
483 PROC_STRING_ATTRIB(Binding,BINDING,NULL);
487 class SAML_DLLLOCAL AuthenticationStatementImpl : public virtual AuthenticationStatement, public SubjectStatementImpl
490 virtual ~AuthenticationStatementImpl() {
491 XMLString::release(&m_AuthenticationMethod);
492 delete m_AuthenticationInstant;
495 AuthenticationStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
496 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
500 AuthenticationStatementImpl(const AuthenticationStatementImpl& src) : AbstractXMLObject(src), SubjectStatementImpl(src) {
502 setAuthenticationMethod(src.getAuthenticationMethod());
503 setAuthenticationInstant(src.getAuthenticationInstant());
504 if (src.getSubjectLocality())
505 setSubjectLocality(src.getSubjectLocality()->cloneSubjectLocality());
506 VectorOf(AuthorityBinding) v=getAuthorityBindings();
507 for (vector<AuthorityBinding*>::const_iterator i=src.m_AuthorityBindings.begin(); i!=src.m_AuthorityBindings.end(); i++) {
509 v.push_back((*i)->cloneAuthorityBinding());
515 m_AuthenticationMethod=NULL;
516 m_AuthenticationInstant=NULL;
517 m_SubjectLocality=NULL;
518 m_children.push_back(NULL);
519 m_pos_SubjectLocality=m_pos_Subject;
520 ++m_pos_SubjectLocality;
523 IMPL_XMLOBJECT_CLONE(AuthenticationStatement);
524 SubjectStatement* cloneSubjectStatement() const {
525 return cloneAuthenticationStatement();
527 Statement* cloneStatement() const {
528 return cloneAuthenticationStatement();
530 IMPL_STRING_ATTRIB(AuthenticationMethod);
531 IMPL_DATETIME_ATTRIB(AuthenticationInstant,0);
532 IMPL_TYPED_CHILD(SubjectLocality);
533 IMPL_TYPED_CHILDREN(AuthorityBinding, m_children.end());
536 void marshallAttributes(DOMElement* domElement) const {
537 MARSHALL_STRING_ATTRIB(AuthenticationMethod,AUTHENTICATIONMETHOD,NULL);
538 MARSHALL_DATETIME_ATTRIB(AuthenticationInstant,AUTHENTICATIONINSTANT,NULL);
539 SubjectStatementImpl::marshallAttributes(domElement);
542 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
543 PROC_TYPED_CHILD(SubjectLocality,SAML1_NS,false);
544 PROC_TYPED_CHILDREN(AuthorityBinding,SAML1_NS,false);
545 SubjectStatementImpl::processChildElement(childXMLObject,root);
548 void processAttribute(const DOMAttr* attribute) {
549 PROC_STRING_ATTRIB(AuthenticationMethod,AUTHENTICATIONMETHOD,NULL);
550 PROC_DATETIME_ATTRIB(AuthenticationInstant,AUTHENTICATIONINSTANT,NULL);
551 SubjectStatementImpl::processAttribute(attribute);
555 class SAML_DLLLOCAL ActionImpl : public virtual Action,
556 public AbstractSimpleElement,
557 public AbstractDOMCachingXMLObject,
558 public AbstractXMLObjectMarshaller,
559 public AbstractXMLObjectUnmarshaller
562 virtual ~ActionImpl() {
563 XMLString::release(&m_Namespace);
566 ActionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
567 : AbstractXMLObject(nsURI, localName, prefix, schemaType), m_Namespace(NULL) {
570 ActionImpl(const ActionImpl& src) : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
571 setNamespace(src.getNamespace());
574 IMPL_XMLOBJECT_CLONE(Action);
575 IMPL_STRING_ATTRIB(Namespace);
578 void marshallAttributes(DOMElement* domElement) const {
579 MARSHALL_STRING_ATTRIB(Namespace,NAMESPACE,NULL);
582 void processAttribute(const DOMAttr* attribute) {
583 PROC_STRING_ATTRIB(Namespace,NAMESPACE,NULL);
587 class SAML_DLLLOCAL EvidenceImpl : public virtual Evidence,
588 public AbstractComplexElement,
589 public AbstractDOMCachingXMLObject,
590 public AbstractXMLObjectMarshaller,
591 public AbstractXMLObjectUnmarshaller
594 virtual ~EvidenceImpl() {}
596 EvidenceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
597 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
600 EvidenceImpl(const EvidenceImpl& src)
601 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
602 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
604 AssertionIDReference* ref=dynamic_cast<AssertionIDReference*>(*i);
606 getAssertionIDReferences().push_back(ref->cloneAssertionIDReference());
610 Assertion* assertion=dynamic_cast<Assertion*>(*i);
612 getAssertions().push_back(assertion->cloneAssertion());
619 IMPL_XMLOBJECT_CLONE(Evidence);
620 IMPL_TYPED_CHILDREN(AssertionIDReference,m_children.end());
621 IMPL_TYPED_CHILDREN(Assertion,m_children.end());
624 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
625 PROC_TYPED_CHILDREN(AssertionIDReference,SAML1_NS,false);
626 PROC_TYPED_CHILDREN(Assertion,SAML1_NS,true);
627 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
631 class SAML_DLLLOCAL AuthorizationDecisionStatementImpl
632 : public virtual AuthorizationDecisionStatement, public SubjectStatementImpl
635 virtual ~AuthorizationDecisionStatementImpl() {
636 XMLString::release(&m_Resource);
637 XMLString::release(&m_Decision);
640 AuthorizationDecisionStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
641 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
645 AuthorizationDecisionStatementImpl(const AuthorizationDecisionStatementImpl& src)
646 : AbstractXMLObject(src), SubjectStatementImpl(src) {
648 setResource(src.getResource());
649 setDecision(src.getDecision());
650 if (src.getEvidence())
651 setEvidence(src.getEvidence()->cloneEvidence());
652 VectorOf(Action) v=getActions();
653 for (vector<Action*>::const_iterator i=src.m_Actions.begin(); i!=src.m_Actions.end(); i++) {
655 v.push_back((*i)->cloneAction());
664 m_children.push_back(NULL);
665 m_pos_Evidence=m_pos_Subject;
669 IMPL_XMLOBJECT_CLONE(AuthorizationDecisionStatement);
670 SubjectStatement* cloneSubjectStatement() const {
671 return cloneAuthorizationDecisionStatement();
673 Statement* cloneStatement() const {
674 return cloneAuthorizationDecisionStatement();
676 IMPL_STRING_ATTRIB(Resource);
677 IMPL_STRING_ATTRIB(Decision);
678 IMPL_TYPED_CHILD(Evidence);
679 IMPL_TYPED_CHILDREN(Action, m_pos_Evidence);
682 void marshallAttributes(DOMElement* domElement) const {
683 MARSHALL_STRING_ATTRIB(Resource,RESOURCE,NULL);
684 MARSHALL_STRING_ATTRIB(Decision,DECISION,NULL);
685 SubjectStatementImpl::marshallAttributes(domElement);
688 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
689 PROC_TYPED_CHILD(Evidence,SAML1_NS,false);
690 PROC_TYPED_CHILDREN(Action,SAML1_NS,false);
691 SubjectStatementImpl::processChildElement(childXMLObject,root);
694 void processAttribute(const DOMAttr* attribute) {
695 PROC_STRING_ATTRIB(Resource,RESOURCE,NULL);
696 PROC_STRING_ATTRIB(Decision,DECISION,NULL);
697 SubjectStatementImpl::processAttribute(attribute);
701 class SAML_DLLLOCAL AttributeDesignatorImpl : public virtual AttributeDesignator,
702 public AbstractSimpleElement,
703 public AbstractDOMCachingXMLObject,
704 public AbstractXMLObjectMarshaller,
705 public AbstractXMLObjectUnmarshaller
708 virtual ~AttributeDesignatorImpl() {
709 XMLString::release(&m_AttributeName);
710 XMLString::release(&m_AttributeNamespace);
713 AttributeDesignatorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
714 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
718 AttributeDesignatorImpl(const AttributeDesignatorImpl& src)
719 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
721 setAttributeName(src.getAttributeName());
722 setAttributeNamespace(src.getAttributeNamespace());
726 m_AttributeName=m_AttributeNamespace=NULL;
729 IMPL_XMLOBJECT_CLONE(AttributeDesignator);
730 IMPL_STRING_ATTRIB(AttributeName);
731 IMPL_STRING_ATTRIB(AttributeNamespace);
734 void marshallAttributes(DOMElement* domElement) const {
735 MARSHALL_STRING_ATTRIB(AttributeName,ATTRIBUTENAME,NULL);
736 MARSHALL_STRING_ATTRIB(AttributeNamespace,ATTRIBUTENAMESPACE,NULL);
739 void processAttribute(const DOMAttr* attribute) {
740 PROC_STRING_ATTRIB(AttributeName,ATTRIBUTENAME,NULL);
741 PROC_STRING_ATTRIB(AttributeNamespace,ATTRIBUTENAMESPACE,NULL);
745 class SAML_DLLLOCAL AttributeImpl : public virtual Attribute,
746 public AbstractComplexElement,
747 public AbstractDOMCachingXMLObject,
748 public AbstractXMLObjectMarshaller,
749 public AbstractXMLObjectUnmarshaller
752 virtual ~AttributeImpl() {
753 XMLString::release(&m_AttributeName);
754 XMLString::release(&m_AttributeNamespace);
757 AttributeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
758 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
762 AttributeImpl(const AttributeImpl& src)
763 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
765 setAttributeName(src.getAttributeName());
766 setAttributeNamespace(src.getAttributeNamespace());
767 VectorOf(XMLObject) v=getAttributeValues();
768 for (vector<XMLObject*>::const_iterator i=src.m_AttributeValues.begin(); i!=src.m_AttributeValues.end(); i++) {
770 v.push_back((*i)->clone());
776 m_AttributeName=m_AttributeNamespace=NULL;
779 IMPL_XMLOBJECT_CLONE(Attribute);
780 AttributeDesignator* cloneAttributeDesignator() const {
781 return cloneAttribute();
783 IMPL_STRING_ATTRIB(AttributeName);
784 IMPL_STRING_ATTRIB(AttributeNamespace);
785 IMPL_XMLOBJECT_CHILDREN(AttributeValue,m_children.end());
788 void marshallAttributes(DOMElement* domElement) const {
789 MARSHALL_STRING_ATTRIB(AttributeName,ATTRIBUTENAME,NULL);
790 MARSHALL_STRING_ATTRIB(AttributeNamespace,ATTRIBUTENAMESPACE,NULL);
793 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
794 getAttributeValues().push_back(childXMLObject);
797 void processAttribute(const DOMAttr* attribute) {
798 PROC_STRING_ATTRIB(AttributeName,ATTRIBUTENAME,NULL);
799 PROC_STRING_ATTRIB(AttributeNamespace,ATTRIBUTENAMESPACE,NULL);
803 class SAML_DLLLOCAL AttributeValueImpl : public virtual AttributeValue, public AnyElementImpl
806 virtual ~AttributeValueImpl() {}
808 AttributeValueImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
809 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
812 AttributeValueImpl(const AttributeValueImpl& src) : AnyElementImpl(src) {}
814 IMPL_XMLOBJECT_CLONE(AttributeValue);
817 class SAML_DLLLOCAL AttributeStatementImpl : public virtual AttributeStatement, public SubjectStatementImpl
820 virtual ~AttributeStatementImpl() {}
822 AttributeStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
823 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
826 AttributeStatementImpl(const AttributeStatementImpl& src)
827 : AbstractXMLObject(src), SubjectStatementImpl(src) {
828 VectorOf(Attribute) v=getAttributes();
829 for (vector<Attribute*>::const_iterator i=src.m_Attributes.begin(); i!=src.m_Attributes.end(); i++) {
831 v.push_back((*i)->cloneAttribute());
836 IMPL_XMLOBJECT_CLONE(AttributeStatement);
837 SubjectStatement* cloneSubjectStatement() const {
838 return cloneAttributeStatement();
840 Statement* cloneStatement() const {
841 return cloneAttributeStatement();
843 IMPL_TYPED_CHILDREN(Attribute, m_children.end());
846 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
847 PROC_TYPED_CHILDREN(Attribute,SAML1_NS,true);
848 SubjectStatementImpl::processChildElement(childXMLObject,root);
852 class SAML_DLLLOCAL AdviceImpl : public virtual Advice,
853 public AbstractComplexElement,
854 public AbstractDOMCachingXMLObject,
855 public AbstractXMLObjectMarshaller,
856 public AbstractXMLObjectUnmarshaller
859 virtual ~AdviceImpl() {}
861 AdviceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
862 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
865 AdviceImpl(const AdviceImpl& src)
866 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
867 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
869 AssertionIDReference* ref=dynamic_cast<AssertionIDReference*>(*i);
871 getAssertionIDReferences().push_back(ref->cloneAssertionIDReference());
875 Assertion* assertion=dynamic_cast<Assertion*>(*i);
877 getAssertions().push_back(assertion->cloneAssertion());
881 getUnknownXMLObjects().push_back((*i)->clone());
886 IMPL_XMLOBJECT_CLONE(Advice);
887 IMPL_TYPED_CHILDREN(AssertionIDReference,m_children.end());
888 IMPL_TYPED_CHILDREN(Assertion,m_children.end());
889 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
892 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
893 PROC_TYPED_CHILDREN(AssertionIDReference,SAML1_NS,false);
894 PROC_TYPED_CHILDREN(Assertion,SAML1_NS,true);
897 const XMLCh* nsURI=root->getNamespaceURI();
898 if (!XMLString::equals(nsURI,SAML1_NS) && nsURI && *nsURI) {
899 getUnknownXMLObjects().push_back(childXMLObject);
903 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
907 class SAML_DLLLOCAL AssertionImpl : public virtual Assertion,
908 public AbstractComplexElement,
909 public AbstractDOMCachingXMLObject,
910 public AbstractXMLObjectMarshaller,
911 public AbstractXMLObjectUnmarshaller
918 m_children.push_back(NULL);
919 m_children.push_back(NULL);
920 m_children.push_back(NULL);
924 m_pos_Conditions=m_children.begin();
925 m_pos_Advice=m_pos_Conditions;
927 m_pos_Signature=m_pos_Advice;
931 virtual ~AssertionImpl() {
932 XMLString::release(&m_MinorVersion);
933 XMLString::release(&m_AssertionID);
934 XMLString::release(&m_Issuer);
935 delete m_IssueInstant;
938 AssertionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
939 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
943 AssertionImpl(const AssertionImpl& src)
944 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
946 setMinorVersion(src.m_MinorVersion);
947 setAssertionID(src.getAssertionID());
948 setIssuer(src.getIssuer());
949 setIssueInstant(src.getIssueInstant());
950 if (src.getConditions())
951 setConditions(src.getConditions()->cloneConditions());
953 setAdvice(src.getAdvice()->cloneAdvice());
954 if (src.getSignature())
955 setSignature(src.getSignature()->cloneSignature());
956 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
958 AuthenticationStatement* authst=dynamic_cast<AuthenticationStatement*>(*i);
960 getAuthenticationStatements().push_back(authst->cloneAuthenticationStatement());
964 AttributeStatement* attst=dynamic_cast<AttributeStatement*>(*i);
966 getAttributeStatements().push_back(attst->cloneAttributeStatement());
970 AuthorizationDecisionStatement* authzst=dynamic_cast<AuthorizationDecisionStatement*>(*i);
972 getAuthorizationDecisionStatements().push_back(authzst->cloneAuthorizationDecisionStatement());
976 SubjectStatement* subst=dynamic_cast<SubjectStatement*>(*i);
978 getSubjectStatements().push_back(subst->cloneSubjectStatement());
982 Statement* st=dynamic_cast<Statement*>(*i);
984 getStatements().push_back(st->cloneStatement());
991 //IMPL_TYPED_CHILD(Signature);
992 // Need customized setter.
994 Signature* m_Signature;
995 list<XMLObject*>::iterator m_pos_Signature;
997 Signature* getSignature() const {
1001 void setSignature(Signature* sig) {
1002 prepareForAssignment(m_Signature,sig);
1003 *m_pos_Signature=m_Signature=sig;
1004 // Sync content reference back up.
1006 m_Signature->setContentReference(new opensaml::ContentReference(*this));
1009 IMPL_XMLOBJECT_CLONE(Assertion);
1010 IMPL_INTEGER_ATTRIB(MinorVersion);
1011 IMPL_STRING_ATTRIB(AssertionID); // have to special-case getXMLID
1012 const XMLCh* getXMLID() const {
1013 pair<bool,int> v = getMinorVersion();
1014 return (!v.first || v.second > 0) ? m_AssertionID : NULL;
1016 const XMLCh* getID() const {
1017 return getAssertionID();
1019 IMPL_STRING_ATTRIB(Issuer);
1020 IMPL_DATETIME_ATTRIB(IssueInstant,0);
1021 IMPL_TYPED_CHILD(Conditions);
1022 IMPL_TYPED_CHILD(Advice);
1023 IMPL_TYPED_CHILDREN(Statement, m_pos_Signature);
1024 IMPL_TYPED_CHILDREN(SubjectStatement, m_pos_Signature);
1025 IMPL_TYPED_CHILDREN(AuthenticationStatement, m_pos_Signature);
1026 IMPL_TYPED_CHILDREN(AttributeStatement, m_pos_Signature);
1027 IMPL_TYPED_CHILDREN(AuthorizationDecisionStatement, m_pos_Signature);
1030 void marshallAttributes(DOMElement* domElement) const {
1031 static const XMLCh MAJORVERSION[] = UNICODE_LITERAL_12(M,a,j,o,r,V,e,r,s,i,o,n);
1032 domElement->setAttributeNS(NULL,MAJORVERSION,XML_ONE);
1033 if (!m_MinorVersion)
1034 const_cast<AssertionImpl*>(this)->m_MinorVersion=XMLString::replicate(XML_ONE);
1035 MARSHALL_INTEGER_ATTRIB(MinorVersion,MINORVERSION,NULL);
1037 const_cast<AssertionImpl*>(this)->m_AssertionID=SAMLConfig::getConfig().generateIdentifier();
1038 MARSHALL_ID_ATTRIB(AssertionID,ASSERTIONID,NULL);
1039 MARSHALL_STRING_ATTRIB(Issuer,ISSUER,NULL);
1040 if (!m_IssueInstant) {
1041 const_cast<AssertionImpl*>(this)->m_IssueInstantEpoch=time(NULL);
1042 const_cast<AssertionImpl*>(this)->m_IssueInstant=new DateTime(m_IssueInstantEpoch);
1044 MARSHALL_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,NULL);
1047 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1048 PROC_TYPED_CHILD(Conditions,SAML1_NS,false);
1049 PROC_TYPED_CHILD(Advice,SAML1_NS,false);
1050 PROC_TYPED_CHILD(Signature,XMLSIG_NS,false);
1051 PROC_TYPED_CHILDREN(AuthenticationStatement,SAML1_NS,false);
1052 PROC_TYPED_CHILDREN(AttributeStatement,SAML1_NS,false);
1053 PROC_TYPED_CHILDREN(AuthorizationDecisionStatement,SAML1_NS,false);
1054 PROC_TYPED_CHILDREN(SubjectStatement,SAML1_NS,true);
1055 PROC_TYPED_CHILDREN(Statement,SAML1_NS,true);
1056 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1059 void processAttribute(const DOMAttr* attribute) {
1060 static const XMLCh MAJORVERSION[] = UNICODE_LITERAL_12(M,a,j,o,r,V,e,r,s,i,o,n);
1061 if (XMLHelper::isNodeNamed(attribute,NULL,MAJORVERSION)) {
1062 if (!XMLString::equals(attribute->getValue(),XML_ONE))
1063 throw UnmarshallingException("Assertion has invalid major version.");
1065 PROC_INTEGER_ATTRIB(MinorVersion,MINORVERSION,NULL);
1066 PROC_ID_ATTRIB(AssertionID,ASSERTIONID,NULL);
1067 PROC_STRING_ATTRIB(Issuer,ISSUER,NULL);
1068 PROC_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,NULL);
1075 #if defined (_MSC_VER)
1076 #pragma warning( pop )
1079 // Builder Implementations
1081 IMPL_XMLOBJECTBUILDER(Action);
1082 IMPL_XMLOBJECTBUILDER(Advice);
1083 IMPL_XMLOBJECTBUILDER(Assertion);
1084 IMPL_XMLOBJECTBUILDER(AssertionIDReference);
1085 IMPL_XMLOBJECTBUILDER(Attribute);
1086 IMPL_XMLOBJECTBUILDER(AttributeDesignator);
1087 IMPL_XMLOBJECTBUILDER(AttributeStatement);
1088 IMPL_XMLOBJECTBUILDER(AttributeValue);
1089 IMPL_XMLOBJECTBUILDER(Audience);
1090 IMPL_XMLOBJECTBUILDER(AudienceRestrictionCondition);
1091 IMPL_XMLOBJECTBUILDER(AuthenticationStatement);
1092 IMPL_XMLOBJECTBUILDER(AuthorizationDecisionStatement);
1093 IMPL_XMLOBJECTBUILDER(AuthorityBinding);
1094 IMPL_XMLOBJECTBUILDER(Conditions);
1095 IMPL_XMLOBJECTBUILDER(ConfirmationMethod);
1096 IMPL_XMLOBJECTBUILDER(DoNotCacheCondition);
1097 IMPL_XMLOBJECTBUILDER(Evidence);
1098 IMPL_XMLOBJECTBUILDER(NameIdentifier);
1099 IMPL_XMLOBJECTBUILDER(Subject);
1100 IMPL_XMLOBJECTBUILDER(SubjectConfirmation);
1101 IMPL_XMLOBJECTBUILDER(SubjectConfirmationData);
1102 IMPL_XMLOBJECTBUILDER(SubjectLocality);
1105 const XMLCh Action::LOCAL_NAME[] = UNICODE_LITERAL_6(A,c,t,i,o,n);
1106 const XMLCh Action::TYPE_NAME[] = UNICODE_LITERAL_10(A,c,t,i,o,n,T,y,p,e);
1107 const XMLCh Action::NAMESPACE_ATTRIB_NAME[] = UNICODE_LITERAL_9(N,a,m,e,s,p,a,c,e);
1108 const XMLCh Advice::LOCAL_NAME[] = UNICODE_LITERAL_6(A,d,v,i,c,e);
1109 const XMLCh Advice::TYPE_NAME[] = UNICODE_LITERAL_10(A,d,v,i,c,e,T,y,p,e);
1110 const XMLCh Assertion::LOCAL_NAME[] = UNICODE_LITERAL_9(A,s,s,e,r,t,i,o,n);
1111 const XMLCh Assertion::TYPE_NAME[] = UNICODE_LITERAL_13(A,s,s,e,r,t,i,o,n,T,y,p,e);
1112 const XMLCh Assertion::MINORVERSION_ATTRIB_NAME[] = UNICODE_LITERAL_12(M,i,n,o,r,V,e,r,s,i,o,n);
1113 const XMLCh Assertion::ASSERTIONID_ATTRIB_NAME[] = UNICODE_LITERAL_11(A,s,s,e,r,t,i,o,n,I,D);
1114 const XMLCh Assertion::ISSUER_ATTRIB_NAME[] = UNICODE_LITERAL_6(I,s,s,u,e,r);
1115 const XMLCh Assertion::ISSUEINSTANT_ATTRIB_NAME[] = UNICODE_LITERAL_12(I,s,s,u,e,I,n,s,t,a,n,t);
1116 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);
1117 const XMLCh Attribute::LOCAL_NAME[] = UNICODE_LITERAL_9(A,t,t,r,i,b,u,t,e);
1118 const XMLCh Attribute::TYPE_NAME[] = UNICODE_LITERAL_13(A,t,t,r,i,b,u,t,e,T,y,p,e);
1119 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);
1120 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);
1121 const XMLCh AttributeDesignator::ATTRIBUTENAME_ATTRIB_NAME[] = UNICODE_LITERAL_13(A,t,t,r,i,b,u,t,e,N,a,m,e);
1122 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);
1123 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);
1124 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);
1125 const XMLCh AttributeValue::LOCAL_NAME[] = UNICODE_LITERAL_14(A,t,t,r,i,b,u,t,e,V,a,l,u,e);
1126 const XMLCh Audience::LOCAL_NAME[] = UNICODE_LITERAL_8(A,u,d,i,e,n,c,e);
1127 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);
1128 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);
1129 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);
1130 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);
1131 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);
1132 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);
1133 const XMLCh AuthorityBinding::LOCAL_NAME[] = UNICODE_LITERAL_16(A,u,t,h,o,r,i,t,y,B,i,n,d,i,n,g);
1134 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);
1135 const XMLCh AuthorityBinding::AUTHORITYKIND_ATTRIB_NAME[] = UNICODE_LITERAL_13(A,u,t,h,o,r,i,t,y,K,i,n,d);
1136 const XMLCh AuthorityBinding::LOCATION_ATTRIB_NAME[] = UNICODE_LITERAL_8(L,o,c,a,t,i,o,n);
1137 const XMLCh AuthorityBinding::BINDING_ATTRIB_NAME[] = UNICODE_LITERAL_7(B,i,n,d,i,n,g);
1138 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);
1139 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);
1140 const XMLCh AuthorizationDecisionStatement::RESOURCE_ATTRIB_NAME[] = UNICODE_LITERAL_8(R,e,s,o,u,r,c,e);
1141 const XMLCh AuthorizationDecisionStatement::DECISION_ATTRIB_NAME[] = UNICODE_LITERAL_8(D,e,c,i,s,i,o,n);
1142 const XMLCh AuthorizationDecisionStatement::DECISION_PERMIT[] = UNICODE_LITERAL_6(P,e,r,m,i,t);
1143 const XMLCh AuthorizationDecisionStatement::DECISION_DENY[] = UNICODE_LITERAL_4(D,e,n,y);
1144 const XMLCh AuthorizationDecisionStatement::DECISION_INDETERMINATE[] = UNICODE_LITERAL_13(I,n,d,e,t,e,r,m,i,n,a,t,e);
1145 const XMLCh Condition::LOCAL_NAME[] = UNICODE_LITERAL_9(C,o,n,d,i,t,i,o,n);
1146 const XMLCh Conditions::LOCAL_NAME[] = UNICODE_LITERAL_10(C,o,n,d,i,t,i,o,n,s);
1147 const XMLCh Conditions::TYPE_NAME[] = UNICODE_LITERAL_14(C,o,n,d,i,t,i,o,n,s,T,y,p,e);
1148 const XMLCh Conditions::NOTBEFORE_ATTRIB_NAME[] = UNICODE_LITERAL_9(N,o,t,B,e,f,o,r,e);
1149 const XMLCh Conditions::NOTONORAFTER_ATTRIB_NAME[] =UNICODE_LITERAL_12(N,o,t,O,n,O,r,A,f,t,e,r);
1150 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);
1151 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);
1152 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);
1153 const XMLCh Evidence::LOCAL_NAME[] = UNICODE_LITERAL_8(E,v,i,d,e,n,c,e);
1154 const XMLCh Evidence::TYPE_NAME[] = UNICODE_LITERAL_12(E,v,i,d,e,n,c,e,T,y,p,e);
1155 const XMLCh NameIdentifier::LOCAL_NAME[] = UNICODE_LITERAL_14(N,a,m,e,I,d,e,n,t,i,f,i,e,r);
1156 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);
1157 const XMLCh NameIdentifier::NAMEQUALIFIER_ATTRIB_NAME[] = UNICODE_LITERAL_13(N,a,m,e,Q,u,a,l,i,f,i,e,r);
1158 const XMLCh NameIdentifier::FORMAT_ATTRIB_NAME[] = UNICODE_LITERAL_6(F,o,r,m,a,t);
1159 const XMLCh Statement::LOCAL_NAME[] = UNICODE_LITERAL_9(S,t,a,t,e,m,e,n,t);
1160 const XMLCh Subject::LOCAL_NAME[] = UNICODE_LITERAL_7(S,u,b,j,e,c,t);
1161 const XMLCh Subject::TYPE_NAME[] = UNICODE_LITERAL_11(S,u,b,j,e,c,t,T,y,p,e);
1162 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);
1163 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);
1164 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);
1165 const XMLCh SubjectLocality::LOCAL_NAME[] = UNICODE_LITERAL_15(S,u,b,j,e,c,t,L,o,c,a,l,i,t,y);
1166 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);
1167 const XMLCh SubjectLocality::IPADDRESS_ATTRIB_NAME[] = UNICODE_LITERAL_9(I,P,A,d,d,r,e,s,s);
1168 const XMLCh SubjectLocality::DNSADDRESS_ATTRIB_NAME[] = UNICODE_LITERAL_10(D,N,S,A,d,d,r,e,s,s);
1169 const XMLCh SubjectStatement::LOCAL_NAME[] = UNICODE_LITERAL_16(S,u,b,j,e,c,t,S,t,a,t,e,m,e,n,t);
1171 const XMLCh NameIdentifier::UNSPECIFIED[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified
1172 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1173 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1174 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1175 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1176 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1177 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
1180 const XMLCh NameIdentifier::EMAIL[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress
1181 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1182 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1183 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1184 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1185 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1186 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
1189 const XMLCh NameIdentifier::X509_SUBJECT[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName
1190 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1191 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1192 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1193 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1194 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1195 chLatin_X, chDigit_5, chDigit_0, chDigit_9, chLatin_S, chLatin_u, chLatin_b, chLatin_j, chLatin_e, chLatin_c, chLatin_t,
1196 chLatin_N, chLatin_a, chLatin_m, chLatin_e, chNull
1199 const XMLCh NameIdentifier::WIN_DOMAIN_QUALIFIED[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName
1200 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1201 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1202 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1203 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1204 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1205 chLatin_W, chLatin_i, chLatin_n, chLatin_d, chLatin_o, chLatin_w, chLatin_s,
1206 chLatin_D, chLatin_o, chLatin_m, chLatin_a, chLatin_i, chLatin_n,
1207 chLatin_Q, chLatin_u, chLatin_a, chLatin_l, chLatin_i, chLatin_f, chLatin_i, chLatin_e, chLatin_d,
1208 chLatin_N, chLatin_a, chLatin_m, chLatin_e, chNull
1211 const XMLCh SubjectConfirmation::ARTIFACT01[] = // urn:oasis:names:tc:SAML:1.0:cm:artifact-01
1212 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1213 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1214 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1215 chLatin_c, chLatin_m, chColon, chLatin_a, chLatin_r, chLatin_t, chLatin_i, chLatin_f, chLatin_a, chLatin_c, chLatin_t,
1216 chDash, chDigit_0, chDigit_1, chNull
1219 const XMLCh SubjectConfirmation::ARTIFACT[] = // urn:oasis:names:tc:SAML:1.0:cm:artifact
1220 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1221 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1222 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1223 chLatin_c, chLatin_m, chColon, chLatin_a, chLatin_r, chLatin_t, chLatin_i, chLatin_f, chLatin_a, chLatin_c, chLatin_t, chNull
1226 const XMLCh SubjectConfirmation::BEARER[] = // urn:oasis:names:tc:SAML:1.0:cm:bearer
1227 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1228 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1229 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1230 chLatin_c, chLatin_m, chColon, chLatin_b, chLatin_e, chLatin_a, chLatin_r, chLatin_e, chLatin_r, chNull
1233 const XMLCh SubjectConfirmation::HOLDER_KEY[] = // urn:oasis:names:tc:SAML:1.0:cm:holder-of-key
1234 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1235 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1236 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1237 chLatin_c, chLatin_m, chColon, chLatin_h, chLatin_o, chLatin_l, chLatin_d, chLatin_e, chLatin_r, chDash,
1238 chLatin_o, chLatin_f, chDash, chLatin_k, chLatin_e, chLatin_y, chNull
1241 const XMLCh SubjectConfirmation::SENDER_VOUCHES[] = // urn:oasis:names:tc:SAML:1.0:cm:sender-vouches
1242 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1243 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1244 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1245 chLatin_c, chLatin_m, chColon, chLatin_s, chLatin_e, chLatin_n, chLatin_d, chLatin_e, chLatin_r, chDash,
1246 chLatin_v, chLatin_o, chLatin_u, chLatin_c, chLatin_h, chLatin_e, chLatin_s, chNull
1249 const XMLCh Action::RWEDC_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:rwedc
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_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1254 chLatin_r, chLatin_w, chLatin_e, chLatin_d, chLatin_c, chNull
1257 const XMLCh Action::RWEDC_NEG_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:rwedc-negation
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_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1262 chLatin_r, chLatin_w, chLatin_e, chLatin_d, chLatin_c, chDash,
1263 chLatin_n, chLatin_e, chLatin_g, chLatin_a, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chNull
1266 const XMLCh Action::GHPP_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:ghpp
1267 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1268 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1269 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1270 chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1271 chLatin_g, chLatin_h, chLatin_p, chLatin_p, chNull
1274 const XMLCh Action::UNIX_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:unix
1275 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1276 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1277 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1278 chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1279 chLatin_u, chLatin_n, chLatin_i, chLatin_x, chNull