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/AbstractElementProxy.h>
29 #include <xmltooling/AbstractSimpleElement.h>
30 #include <xmltooling/impl/AnyElement.h>
31 #include <xmltooling/io/AbstractXMLObjectMarshaller.h>
32 #include <xmltooling/io/AbstractXMLObjectUnmarshaller.h>
33 #include <xmltooling/util/XMLHelper.h>
37 #include <xercesc/util/XMLUniDefs.hpp>
39 using namespace opensaml::saml1;
40 using namespace opensaml;
41 using namespace xmlsignature;
42 using namespace xmltooling;
44 using xmlconstants::XMLSIG_NS;
45 using xmlconstants::XML_ONE;
46 using samlconstants::SAML1_NS;
48 #if defined (_MSC_VER)
49 #pragma warning( push )
50 #pragma warning( disable : 4250 4251 )
56 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AssertionIDReference);
57 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,Audience);
58 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,ConfirmationMethod);
60 class SAML_DLLLOCAL AudienceRestrictionConditionImpl : public virtual AudienceRestrictionCondition,
61 public AbstractComplexElement,
62 public AbstractDOMCachingXMLObject,
63 public AbstractXMLObjectMarshaller,
64 public AbstractXMLObjectUnmarshaller
67 virtual ~AudienceRestrictionConditionImpl() {}
69 AudienceRestrictionConditionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
70 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
73 AudienceRestrictionConditionImpl(const AudienceRestrictionConditionImpl& src)
74 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
75 VectorOf(Audience) v=getAudiences();
76 for (vector<Audience*>::const_iterator i=src.m_Audiences.begin(); i!=src.m_Audiences.end(); i++) {
78 v.push_back((*i)->cloneAudience());
83 IMPL_XMLOBJECT_CLONE(AudienceRestrictionCondition);
84 Condition* cloneCondition() const {
85 return cloneAudienceRestrictionCondition();
87 IMPL_TYPED_CHILDREN(Audience,m_children.end());
90 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
91 PROC_TYPED_CHILDREN(Audience,SAML1_NS,false);
92 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
96 class SAML_DLLLOCAL DoNotCacheConditionImpl : public virtual DoNotCacheCondition,
97 public AbstractSimpleElement,
98 public AbstractDOMCachingXMLObject,
99 public AbstractXMLObjectMarshaller,
100 public AbstractXMLObjectUnmarshaller
103 virtual ~DoNotCacheConditionImpl() {}
105 DoNotCacheConditionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
106 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
109 DoNotCacheConditionImpl(const DoNotCacheConditionImpl& src)
110 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
113 IMPL_XMLOBJECT_CLONE(DoNotCacheCondition);
114 Condition* cloneCondition() const {
115 return cloneDoNotCacheCondition();
119 class SAML_DLLLOCAL ConditionsImpl : public virtual Conditions,
120 public AbstractComplexElement,
121 public AbstractDOMCachingXMLObject,
122 public AbstractXMLObjectMarshaller,
123 public AbstractXMLObjectUnmarshaller
126 virtual ~ConditionsImpl() {
128 delete m_NotOnOrAfter;
131 ConditionsImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
132 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
136 ConditionsImpl(const ConditionsImpl& src)
137 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
139 setNotBefore(src.getNotBefore());
140 setNotOnOrAfter(src.getNotOnOrAfter());
142 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
144 AudienceRestrictionCondition* arc=dynamic_cast<AudienceRestrictionCondition*>(*i);
146 getAudienceRestrictionConditions().push_back(arc->cloneAudienceRestrictionCondition());
150 DoNotCacheCondition* dncc=dynamic_cast<DoNotCacheCondition*>(*i);
152 getDoNotCacheConditions().push_back(dncc->cloneDoNotCacheCondition());
156 Condition* c=dynamic_cast<Condition*>(*i);
158 getConditions().push_back(c->cloneCondition());
166 m_NotBefore=m_NotOnOrAfter=NULL;
169 IMPL_XMLOBJECT_CLONE(Conditions);
170 IMPL_DATETIME_ATTRIB(NotBefore,0);
171 IMPL_DATETIME_ATTRIB(NotOnOrAfter,SAMLTIME_MAX);
172 IMPL_TYPED_CHILDREN(AudienceRestrictionCondition, m_children.end());
173 IMPL_TYPED_CHILDREN(DoNotCacheCondition,m_children.end());
174 IMPL_TYPED_CHILDREN(Condition,m_children.end());
177 void marshallAttributes(DOMElement* domElement) const {
178 MARSHALL_DATETIME_ATTRIB(NotBefore,NOTBEFORE,NULL);
179 MARSHALL_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,NULL);
182 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
183 PROC_TYPED_CHILDREN(AudienceRestrictionCondition,SAML1_NS,true);
184 PROC_TYPED_CHILDREN(DoNotCacheCondition,SAML1_NS,true);
185 PROC_TYPED_CHILDREN(Condition,SAML1_NS,true);
186 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
189 void processAttribute(const DOMAttr* attribute) {
190 PROC_DATETIME_ATTRIB(NotBefore,NOTBEFORE,NULL);
191 PROC_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,NULL);
195 class SAML_DLLLOCAL NameIdentifierImpl : public virtual NameIdentifier,
196 public AbstractSimpleElement,
197 public AbstractDOMCachingXMLObject,
198 public AbstractXMLObjectMarshaller,
199 public AbstractXMLObjectUnmarshaller
202 virtual ~NameIdentifierImpl() {
203 XMLString::release(&m_Format);
204 XMLString::release(&m_NameQualifier);
207 NameIdentifierImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
208 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
212 NameIdentifierImpl(const NameIdentifierImpl& src)
213 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
215 setFormat(src.getFormat());
216 setNameQualifier(src.getNameQualifier());
220 m_Format=m_NameQualifier=NULL;
223 IMPL_XMLOBJECT_CLONE(NameIdentifier);
224 IMPL_STRING_ATTRIB(Format);
225 IMPL_STRING_ATTRIB(NameQualifier);
228 void marshallAttributes(DOMElement* domElement) const {
229 MARSHALL_STRING_ATTRIB(Format,FORMAT,NULL);
230 MARSHALL_STRING_ATTRIB(NameQualifier,NAMEQUALIFIER,NULL);
233 void processAttribute(const DOMAttr* attribute) {
234 PROC_STRING_ATTRIB(Format,FORMAT,NULL);
235 PROC_STRING_ATTRIB(NameQualifier,NAMEQUALIFIER,NULL);
239 class SAML_DLLLOCAL SubjectConfirmationDataImpl : public virtual SubjectConfirmationData, public AnyElementImpl
242 virtual ~SubjectConfirmationDataImpl() {}
244 SubjectConfirmationDataImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
245 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
248 SubjectConfirmationDataImpl(const SubjectConfirmationDataImpl& src) : AnyElementImpl(src) {
251 IMPL_XMLOBJECT_CLONE(SubjectConfirmationData);
254 class SAML_DLLLOCAL SubjectConfirmationImpl : public virtual SubjectConfirmation,
255 public AbstractComplexElement,
256 public AbstractDOMCachingXMLObject,
257 public AbstractXMLObjectMarshaller,
258 public AbstractXMLObjectUnmarshaller
261 virtual ~SubjectConfirmationImpl() {}
263 SubjectConfirmationImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
264 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
268 SubjectConfirmationImpl(const SubjectConfirmationImpl& src)
269 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
271 if (src.getSubjectConfirmationData())
272 setSubjectConfirmationData(src.getSubjectConfirmationData()->clone());
273 if (src.getKeyInfo())
274 setKeyInfo(src.getKeyInfo()->cloneKeyInfo());
275 VectorOf(ConfirmationMethod) v=getConfirmationMethods();
276 for (vector<ConfirmationMethod*>::const_iterator i=src.m_ConfirmationMethods.begin(); i!=src.m_ConfirmationMethods.end(); i++) {
278 v.push_back((*i)->cloneConfirmationMethod());
284 m_SubjectConfirmationData=NULL;
286 m_children.push_back(NULL);
287 m_children.push_back(NULL);
288 m_pos_SubjectConfirmationData=m_children.begin();
289 m_pos_KeyInfo=m_pos_SubjectConfirmationData;
293 IMPL_XMLOBJECT_CLONE(SubjectConfirmation);
294 IMPL_TYPED_CHILDREN(ConfirmationMethod,m_pos_SubjectConfirmationData);
295 IMPL_XMLOBJECT_CHILD(SubjectConfirmationData);
296 IMPL_TYPED_CHILD(KeyInfo);
299 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
300 PROC_TYPED_CHILDREN(ConfirmationMethod,SAML1_NS,false);
301 PROC_TYPED_CHILD(KeyInfo,XMLSIG_NS,false);
303 // Anything else we'll assume is the data.
304 if (getSubjectConfirmationData())
305 throw UnmarshallingException("Invalid child element: $1",params(1,childXMLObject->getElementQName().toString().c_str()));
306 setSubjectConfirmationData(childXMLObject);
310 class SAML_DLLLOCAL SubjectImpl : public virtual Subject,
311 public AbstractComplexElement,
312 public AbstractDOMCachingXMLObject,
313 public AbstractXMLObjectMarshaller,
314 public AbstractXMLObjectUnmarshaller
317 virtual ~SubjectImpl() {}
319 SubjectImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
320 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
324 SubjectImpl(const SubjectImpl& src)
325 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
327 if (src.getNameIdentifier())
328 setNameIdentifier(src.getNameIdentifier()->cloneNameIdentifier());
329 if (src.getSubjectConfirmation())
330 setSubjectConfirmation(src.getSubjectConfirmation()->cloneSubjectConfirmation());
334 m_NameIdentifier=NULL;
335 m_SubjectConfirmation=NULL;
336 m_children.push_back(NULL);
337 m_children.push_back(NULL);
338 m_pos_NameIdentifier=m_children.begin();
339 m_pos_SubjectConfirmation=m_pos_NameIdentifier;
340 ++m_pos_SubjectConfirmation;
343 IMPL_XMLOBJECT_CLONE(Subject);
344 IMPL_TYPED_CHILD(NameIdentifier);
345 IMPL_TYPED_CHILD(SubjectConfirmation);
348 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
349 PROC_TYPED_CHILD(NameIdentifier,SAML1_NS,true);
350 PROC_TYPED_CHILD(SubjectConfirmation,SAML1_NS,true);
351 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
355 class SAML_DLLLOCAL SubjectStatementImpl : public virtual SubjectStatement,
356 public AbstractComplexElement,
357 public AbstractDOMCachingXMLObject,
358 public AbstractXMLObjectMarshaller,
359 public AbstractXMLObjectUnmarshaller
363 m_children.push_back(NULL);
364 m_pos_Subject=m_children.begin();
367 SubjectStatementImpl() {
371 virtual ~SubjectStatementImpl() {}
373 SubjectStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
374 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
378 SubjectStatementImpl(const SubjectStatementImpl& src)
379 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
381 if (src.getSubject())
382 setSubject(src.getSubject()->cloneSubject());
385 IMPL_TYPED_CHILD(Subject);
388 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
389 PROC_TYPED_CHILD(Subject,SAML1_NS,true);
390 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
394 class SAML_DLLLOCAL SubjectLocalityImpl : public virtual SubjectLocality,
395 public AbstractSimpleElement,
396 public AbstractDOMCachingXMLObject,
397 public AbstractXMLObjectMarshaller,
398 public AbstractXMLObjectUnmarshaller
401 virtual ~SubjectLocalityImpl() {
402 XMLString::release(&m_IPAddress);
403 XMLString::release(&m_DNSAddress);
406 SubjectLocalityImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
407 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
411 SubjectLocalityImpl(const SubjectLocalityImpl& src)
412 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
414 setIPAddress(src.getIPAddress());
415 setDNSAddress(src.getDNSAddress());
419 m_IPAddress=m_DNSAddress=NULL;
422 IMPL_XMLOBJECT_CLONE(SubjectLocality);
423 IMPL_STRING_ATTRIB(IPAddress);
424 IMPL_STRING_ATTRIB(DNSAddress);
427 void marshallAttributes(DOMElement* domElement) const {
428 MARSHALL_STRING_ATTRIB(IPAddress,IPADDRESS,NULL);
429 MARSHALL_STRING_ATTRIB(DNSAddress,DNSADDRESS,NULL);
432 void processAttribute(const DOMAttr* attribute) {
433 PROC_STRING_ATTRIB(IPAddress,IPADDRESS,NULL);
434 PROC_STRING_ATTRIB(DNSAddress,DNSADDRESS,NULL);
438 class SAML_DLLLOCAL AuthorityBindingImpl : public virtual AuthorityBinding,
439 public AbstractSimpleElement,
440 public AbstractDOMCachingXMLObject,
441 public AbstractXMLObjectMarshaller,
442 public AbstractXMLObjectUnmarshaller
445 virtual ~AuthorityBindingImpl() {
446 delete m_AuthorityKind;
447 XMLString::release(&m_Location);
448 XMLString::release(&m_Binding);
451 AuthorityBindingImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
452 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
456 AuthorityBindingImpl(const AuthorityBindingImpl& src)
457 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
459 setAuthorityKind(src.getAuthorityKind());
460 setLocation(src.getLocation());
461 setBinding(src.getBinding());
465 m_AuthorityKind=NULL;
466 m_Location=m_Binding=NULL;
469 IMPL_XMLOBJECT_CLONE(AuthorityBinding);
470 IMPL_XMLOBJECT_ATTRIB(AuthorityKind,QName);
471 IMPL_STRING_ATTRIB(Location);
472 IMPL_STRING_ATTRIB(Binding);
475 void marshallAttributes(DOMElement* domElement) const {
476 MARSHALL_QNAME_ATTRIB(AuthorityKind,AUTHORITYKIND,NULL);
477 MARSHALL_STRING_ATTRIB(Location,LOCATION,NULL);
478 MARSHALL_STRING_ATTRIB(Binding,BINDING,NULL);
481 void processAttribute(const DOMAttr* attribute) {
482 PROC_QNAME_ATTRIB(AuthorityKind,AUTHORITYKIND,NULL);
483 PROC_STRING_ATTRIB(Location,LOCATION,NULL);
484 PROC_STRING_ATTRIB(Binding,BINDING,NULL);
488 class SAML_DLLLOCAL AuthenticationStatementImpl : public virtual AuthenticationStatement, public SubjectStatementImpl
491 virtual ~AuthenticationStatementImpl() {
492 XMLString::release(&m_AuthenticationMethod);
493 delete m_AuthenticationInstant;
496 AuthenticationStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
497 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
501 AuthenticationStatementImpl(const AuthenticationStatementImpl& src) : AbstractXMLObject(src), SubjectStatementImpl(src) {
503 setAuthenticationMethod(src.getAuthenticationMethod());
504 setAuthenticationInstant(src.getAuthenticationInstant());
505 if (src.getSubjectLocality())
506 setSubjectLocality(src.getSubjectLocality()->cloneSubjectLocality());
507 VectorOf(AuthorityBinding) v=getAuthorityBindings();
508 for (vector<AuthorityBinding*>::const_iterator i=src.m_AuthorityBindings.begin(); i!=src.m_AuthorityBindings.end(); i++) {
510 v.push_back((*i)->cloneAuthorityBinding());
516 m_AuthenticationMethod=NULL;
517 m_AuthenticationInstant=NULL;
518 m_SubjectLocality=NULL;
519 m_children.push_back(NULL);
520 m_pos_SubjectLocality=m_pos_Subject;
521 ++m_pos_SubjectLocality;
524 IMPL_XMLOBJECT_CLONE(AuthenticationStatement);
525 SubjectStatement* cloneSubjectStatement() const {
526 return cloneAuthenticationStatement();
528 Statement* cloneStatement() const {
529 return cloneAuthenticationStatement();
531 IMPL_STRING_ATTRIB(AuthenticationMethod);
532 IMPL_DATETIME_ATTRIB(AuthenticationInstant,0);
533 IMPL_TYPED_CHILD(SubjectLocality);
534 IMPL_TYPED_CHILDREN(AuthorityBinding, m_children.end());
537 void marshallAttributes(DOMElement* domElement) const {
538 MARSHALL_STRING_ATTRIB(AuthenticationMethod,AUTHENTICATIONMETHOD,NULL);
539 MARSHALL_DATETIME_ATTRIB(AuthenticationInstant,AUTHENTICATIONINSTANT,NULL);
540 SubjectStatementImpl::marshallAttributes(domElement);
543 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
544 PROC_TYPED_CHILD(SubjectLocality,SAML1_NS,false);
545 PROC_TYPED_CHILDREN(AuthorityBinding,SAML1_NS,false);
546 SubjectStatementImpl::processChildElement(childXMLObject,root);
549 void processAttribute(const DOMAttr* attribute) {
550 PROC_STRING_ATTRIB(AuthenticationMethod,AUTHENTICATIONMETHOD,NULL);
551 PROC_DATETIME_ATTRIB(AuthenticationInstant,AUTHENTICATIONINSTANT,NULL);
552 SubjectStatementImpl::processAttribute(attribute);
556 class SAML_DLLLOCAL ActionImpl : public virtual Action,
557 public AbstractSimpleElement,
558 public AbstractDOMCachingXMLObject,
559 public AbstractXMLObjectMarshaller,
560 public AbstractXMLObjectUnmarshaller
563 virtual ~ActionImpl() {
564 XMLString::release(&m_Namespace);
567 ActionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
568 : AbstractXMLObject(nsURI, localName, prefix, schemaType), m_Namespace(NULL) {
571 ActionImpl(const ActionImpl& src) : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
572 setNamespace(src.getNamespace());
575 IMPL_XMLOBJECT_CLONE(Action);
576 IMPL_STRING_ATTRIB(Namespace);
579 void marshallAttributes(DOMElement* domElement) const {
580 MARSHALL_STRING_ATTRIB(Namespace,NAMESPACE,NULL);
583 void processAttribute(const DOMAttr* attribute) {
584 PROC_STRING_ATTRIB(Namespace,NAMESPACE,NULL);
588 class SAML_DLLLOCAL EvidenceImpl : public virtual Evidence,
589 public AbstractComplexElement,
590 public AbstractDOMCachingXMLObject,
591 public AbstractXMLObjectMarshaller,
592 public AbstractXMLObjectUnmarshaller
595 virtual ~EvidenceImpl() {}
597 EvidenceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
598 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
601 EvidenceImpl(const EvidenceImpl& src)
602 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
603 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
605 AssertionIDReference* ref=dynamic_cast<AssertionIDReference*>(*i);
607 getAssertionIDReferences().push_back(ref->cloneAssertionIDReference());
611 Assertion* assertion=dynamic_cast<Assertion*>(*i);
613 getAssertions().push_back(assertion->cloneAssertion());
620 IMPL_XMLOBJECT_CLONE(Evidence);
621 IMPL_TYPED_CHILDREN(AssertionIDReference,m_children.end());
622 IMPL_TYPED_CHILDREN(Assertion,m_children.end());
625 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
626 PROC_TYPED_CHILDREN(AssertionIDReference,SAML1_NS,false);
627 PROC_TYPED_CHILDREN(Assertion,SAML1_NS,true);
628 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
632 class SAML_DLLLOCAL AuthorizationDecisionStatementImpl
633 : public virtual AuthorizationDecisionStatement, public SubjectStatementImpl
636 virtual ~AuthorizationDecisionStatementImpl() {
637 XMLString::release(&m_Resource);
638 XMLString::release(&m_Decision);
641 AuthorizationDecisionStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
642 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
646 AuthorizationDecisionStatementImpl(const AuthorizationDecisionStatementImpl& src)
647 : AbstractXMLObject(src), SubjectStatementImpl(src) {
649 setResource(src.getResource());
650 setDecision(src.getDecision());
651 if (src.getEvidence())
652 setEvidence(src.getEvidence()->cloneEvidence());
653 VectorOf(Action) v=getActions();
654 for (vector<Action*>::const_iterator i=src.m_Actions.begin(); i!=src.m_Actions.end(); i++) {
656 v.push_back((*i)->cloneAction());
665 m_children.push_back(NULL);
666 m_pos_Evidence=m_pos_Subject;
670 IMPL_XMLOBJECT_CLONE(AuthorizationDecisionStatement);
671 SubjectStatement* cloneSubjectStatement() const {
672 return cloneAuthorizationDecisionStatement();
674 Statement* cloneStatement() const {
675 return cloneAuthorizationDecisionStatement();
677 IMPL_STRING_ATTRIB(Resource);
678 IMPL_STRING_ATTRIB(Decision);
679 IMPL_TYPED_CHILD(Evidence);
680 IMPL_TYPED_CHILDREN(Action, m_pos_Evidence);
683 void marshallAttributes(DOMElement* domElement) const {
684 MARSHALL_STRING_ATTRIB(Resource,RESOURCE,NULL);
685 MARSHALL_STRING_ATTRIB(Decision,DECISION,NULL);
686 SubjectStatementImpl::marshallAttributes(domElement);
689 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
690 PROC_TYPED_CHILD(Evidence,SAML1_NS,false);
691 PROC_TYPED_CHILDREN(Action,SAML1_NS,false);
692 SubjectStatementImpl::processChildElement(childXMLObject,root);
695 void processAttribute(const DOMAttr* attribute) {
696 PROC_STRING_ATTRIB(Resource,RESOURCE,NULL);
697 PROC_STRING_ATTRIB(Decision,DECISION,NULL);
698 SubjectStatementImpl::processAttribute(attribute);
702 class SAML_DLLLOCAL AttributeDesignatorImpl : public virtual AttributeDesignator,
703 public AbstractSimpleElement,
704 public AbstractDOMCachingXMLObject,
705 public AbstractXMLObjectMarshaller,
706 public AbstractXMLObjectUnmarshaller
709 virtual ~AttributeDesignatorImpl() {
710 XMLString::release(&m_AttributeName);
711 XMLString::release(&m_AttributeNamespace);
714 AttributeDesignatorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
715 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
719 AttributeDesignatorImpl(const AttributeDesignatorImpl& src)
720 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
722 setAttributeName(src.getAttributeName());
723 setAttributeNamespace(src.getAttributeNamespace());
727 m_AttributeName=m_AttributeNamespace=NULL;
730 IMPL_XMLOBJECT_CLONE(AttributeDesignator);
731 IMPL_STRING_ATTRIB(AttributeName);
732 IMPL_STRING_ATTRIB(AttributeNamespace);
735 void marshallAttributes(DOMElement* domElement) const {
736 MARSHALL_STRING_ATTRIB(AttributeName,ATTRIBUTENAME,NULL);
737 MARSHALL_STRING_ATTRIB(AttributeNamespace,ATTRIBUTENAMESPACE,NULL);
740 void processAttribute(const DOMAttr* attribute) {
741 PROC_STRING_ATTRIB(AttributeName,ATTRIBUTENAME,NULL);
742 PROC_STRING_ATTRIB(AttributeNamespace,ATTRIBUTENAMESPACE,NULL);
746 class SAML_DLLLOCAL AttributeImpl : public virtual Attribute,
747 public AbstractComplexElement,
748 public AbstractDOMCachingXMLObject,
749 public AbstractXMLObjectMarshaller,
750 public AbstractXMLObjectUnmarshaller
753 virtual ~AttributeImpl() {
754 XMLString::release(&m_AttributeName);
755 XMLString::release(&m_AttributeNamespace);
758 AttributeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
759 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
763 AttributeImpl(const AttributeImpl& src)
764 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
766 setAttributeName(src.getAttributeName());
767 setAttributeNamespace(src.getAttributeNamespace());
768 VectorOf(XMLObject) v=getAttributeValues();
769 for (vector<XMLObject*>::const_iterator i=src.m_AttributeValues.begin(); i!=src.m_AttributeValues.end(); i++) {
771 v.push_back((*i)->clone());
777 m_AttributeName=m_AttributeNamespace=NULL;
780 IMPL_XMLOBJECT_CLONE(Attribute);
781 AttributeDesignator* cloneAttributeDesignator() const {
782 return cloneAttribute();
784 IMPL_STRING_ATTRIB(AttributeName);
785 IMPL_STRING_ATTRIB(AttributeNamespace);
786 IMPL_XMLOBJECT_CHILDREN(AttributeValue,m_children.end());
789 void marshallAttributes(DOMElement* domElement) const {
790 MARSHALL_STRING_ATTRIB(AttributeName,ATTRIBUTENAME,NULL);
791 MARSHALL_STRING_ATTRIB(AttributeNamespace,ATTRIBUTENAMESPACE,NULL);
794 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
795 getAttributeValues().push_back(childXMLObject);
798 void processAttribute(const DOMAttr* attribute) {
799 PROC_STRING_ATTRIB(AttributeName,ATTRIBUTENAME,NULL);
800 PROC_STRING_ATTRIB(AttributeNamespace,ATTRIBUTENAMESPACE,NULL);
804 class SAML_DLLLOCAL AttributeValueImpl : public virtual AttributeValue, public AnyElementImpl
807 virtual ~AttributeValueImpl() {}
809 AttributeValueImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
810 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
813 AttributeValueImpl(const AttributeValueImpl& src) : AnyElementImpl(src) {}
815 IMPL_XMLOBJECT_CLONE(AttributeValue);
818 class SAML_DLLLOCAL AttributeStatementImpl : public virtual AttributeStatement, public SubjectStatementImpl
821 virtual ~AttributeStatementImpl() {}
823 AttributeStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
824 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
827 AttributeStatementImpl(const AttributeStatementImpl& src)
828 : AbstractXMLObject(src), SubjectStatementImpl(src) {
829 VectorOf(Attribute) v=getAttributes();
830 for (vector<Attribute*>::const_iterator i=src.m_Attributes.begin(); i!=src.m_Attributes.end(); i++) {
832 v.push_back((*i)->cloneAttribute());
837 IMPL_XMLOBJECT_CLONE(AttributeStatement);
838 SubjectStatement* cloneSubjectStatement() const {
839 return cloneAttributeStatement();
841 Statement* cloneStatement() const {
842 return cloneAttributeStatement();
844 IMPL_TYPED_CHILDREN(Attribute, m_children.end());
847 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
848 PROC_TYPED_CHILDREN(Attribute,SAML1_NS,true);
849 SubjectStatementImpl::processChildElement(childXMLObject,root);
853 class SAML_DLLLOCAL AdviceImpl : public virtual Advice,
854 public AbstractComplexElement,
855 public AbstractDOMCachingXMLObject,
856 public AbstractXMLObjectMarshaller,
857 public AbstractXMLObjectUnmarshaller
860 virtual ~AdviceImpl() {}
862 AdviceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
863 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
866 AdviceImpl(const AdviceImpl& src)
867 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
868 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
870 AssertionIDReference* ref=dynamic_cast<AssertionIDReference*>(*i);
872 getAssertionIDReferences().push_back(ref->cloneAssertionIDReference());
876 Assertion* assertion=dynamic_cast<Assertion*>(*i);
878 getAssertions().push_back(assertion->cloneAssertion());
882 getOthers().push_back((*i)->clone());
887 IMPL_XMLOBJECT_CLONE(Advice);
888 IMPL_TYPED_CHILDREN(AssertionIDReference,m_children.end());
889 IMPL_TYPED_CHILDREN(Assertion,m_children.end());
890 IMPL_XMLOBJECT_CHILDREN(Other,m_children.end());
893 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
894 PROC_TYPED_CHILDREN(AssertionIDReference,SAML1_NS,false);
895 PROC_TYPED_CHILDREN(Assertion,SAML1_NS,true);
898 const XMLCh* nsURI=root->getNamespaceURI();
899 if (!XMLString::equals(nsURI,SAML1_NS) && nsURI && *nsURI) {
900 getOthers().push_back(childXMLObject);
904 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
908 class SAML_DLLLOCAL AssertionImpl : public virtual Assertion,
909 public AbstractComplexElement,
910 public AbstractDOMCachingXMLObject,
911 public AbstractXMLObjectMarshaller,
912 public AbstractXMLObjectUnmarshaller
919 m_children.push_back(NULL);
920 m_children.push_back(NULL);
921 m_children.push_back(NULL);
925 m_pos_Conditions=m_children.begin();
926 m_pos_Advice=m_pos_Conditions;
928 m_pos_Signature=m_pos_Advice;
932 virtual ~AssertionImpl() {
933 XMLString::release(&m_MinorVersion);
934 XMLString::release(&m_AssertionID);
935 XMLString::release(&m_Issuer);
936 delete m_IssueInstant;
939 AssertionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
940 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
944 AssertionImpl(const AssertionImpl& src)
945 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
947 setMinorVersion(src.m_MinorVersion);
948 setAssertionID(src.getAssertionID());
949 setIssuer(src.getIssuer());
950 setIssueInstant(src.getIssueInstant());
951 if (src.getConditions())
952 setConditions(src.getConditions()->cloneConditions());
954 setAdvice(src.getAdvice()->cloneAdvice());
955 if (src.getSignature())
956 setSignature(src.getSignature()->cloneSignature());
957 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
959 AuthenticationStatement* authst=dynamic_cast<AuthenticationStatement*>(*i);
961 getAuthenticationStatements().push_back(authst->cloneAuthenticationStatement());
965 AttributeStatement* attst=dynamic_cast<AttributeStatement*>(*i);
967 getAttributeStatements().push_back(attst->cloneAttributeStatement());
971 AuthorizationDecisionStatement* authzst=dynamic_cast<AuthorizationDecisionStatement*>(*i);
973 getAuthorizationDecisionStatements().push_back(authzst->cloneAuthorizationDecisionStatement());
977 SubjectStatement* subst=dynamic_cast<SubjectStatement*>(*i);
979 getSubjectStatements().push_back(subst->cloneSubjectStatement());
983 Statement* st=dynamic_cast<Statement*>(*i);
985 getStatements().push_back(st->cloneStatement());
992 //IMPL_TYPED_CHILD(Signature);
993 // Need customized setter.
995 Signature* m_Signature;
996 list<XMLObject*>::iterator m_pos_Signature;
998 Signature* getSignature() const {
1002 void setSignature(Signature* sig) {
1003 prepareForAssignment(m_Signature,sig);
1004 *m_pos_Signature=m_Signature=sig;
1005 // Sync content reference back up.
1007 m_Signature->setContentReference(new opensaml::ContentReference(*this));
1010 IMPL_XMLOBJECT_CLONE(Assertion);
1011 IMPL_INTEGER_ATTRIB(MinorVersion);
1012 IMPL_STRING_ATTRIB(AssertionID); // have to special-case getXMLID
1013 const XMLCh* getXMLID() const {
1014 pair<bool,int> v = getMinorVersion();
1015 return (!v.first || v.second > 0) ? m_AssertionID : NULL;
1017 IMPL_STRING_ATTRIB(Issuer);
1018 IMPL_DATETIME_ATTRIB(IssueInstant,0);
1019 IMPL_TYPED_CHILD(Conditions);
1020 IMPL_TYPED_CHILD(Advice);
1021 IMPL_TYPED_CHILDREN(Statement, m_pos_Signature);
1022 IMPL_TYPED_CHILDREN(SubjectStatement, m_pos_Signature);
1023 IMPL_TYPED_CHILDREN(AuthenticationStatement, m_pos_Signature);
1024 IMPL_TYPED_CHILDREN(AttributeStatement, m_pos_Signature);
1025 IMPL_TYPED_CHILDREN(AuthorizationDecisionStatement, m_pos_Signature);
1028 void marshallAttributes(DOMElement* domElement) const {
1029 static const XMLCh MAJORVERSION[] = UNICODE_LITERAL_12(M,a,j,o,r,V,e,r,s,i,o,n);
1030 domElement->setAttributeNS(NULL,MAJORVERSION,XML_ONE);
1031 if (!m_MinorVersion)
1032 const_cast<AssertionImpl*>(this)->m_MinorVersion=XMLString::replicate(XML_ONE);
1033 MARSHALL_INTEGER_ATTRIB(MinorVersion,MINORVERSION,NULL);
1035 const_cast<AssertionImpl*>(this)->m_AssertionID=SAMLConfig::getConfig().generateIdentifier();
1036 MARSHALL_ID_ATTRIB(AssertionID,ASSERTIONID,NULL);
1037 MARSHALL_STRING_ATTRIB(Issuer,ISSUER,NULL);
1038 if (!m_IssueInstant) {
1039 const_cast<AssertionImpl*>(this)->m_IssueInstantEpoch=time(NULL);
1040 const_cast<AssertionImpl*>(this)->m_IssueInstant=new DateTime(m_IssueInstantEpoch);
1042 MARSHALL_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,NULL);
1045 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1046 PROC_TYPED_CHILD(Conditions,SAML1_NS,false);
1047 PROC_TYPED_CHILD(Advice,SAML1_NS,false);
1048 PROC_TYPED_CHILD(Signature,XMLSIG_NS,false);
1049 PROC_TYPED_CHILDREN(AuthenticationStatement,SAML1_NS,false);
1050 PROC_TYPED_CHILDREN(AttributeStatement,SAML1_NS,false);
1051 PROC_TYPED_CHILDREN(AuthorizationDecisionStatement,SAML1_NS,false);
1052 PROC_TYPED_CHILDREN(SubjectStatement,SAML1_NS,true);
1053 PROC_TYPED_CHILDREN(Statement,SAML1_NS,true);
1054 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1057 void processAttribute(const DOMAttr* attribute) {
1058 static const XMLCh MAJORVERSION[] = UNICODE_LITERAL_12(M,a,j,o,r,V,e,r,s,i,o,n);
1059 if (XMLHelper::isNodeNamed(attribute,NULL,MAJORVERSION)) {
1060 if (!XMLString::equals(attribute->getValue(),XML_ONE))
1061 throw UnmarshallingException("Assertion has invalid major version.");
1063 PROC_INTEGER_ATTRIB(MinorVersion,MINORVERSION,NULL);
1064 PROC_ID_ATTRIB(AssertionID,ASSERTIONID,NULL);
1065 PROC_STRING_ATTRIB(Issuer,ISSUER,NULL);
1066 PROC_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,NULL);
1073 #if defined (_MSC_VER)
1074 #pragma warning( pop )
1077 // Builder Implementations
1079 IMPL_XMLOBJECTBUILDER(Action);
1080 IMPL_XMLOBJECTBUILDER(Advice);
1081 IMPL_XMLOBJECTBUILDER(Assertion);
1082 IMPL_XMLOBJECTBUILDER(AssertionIDReference);
1083 IMPL_XMLOBJECTBUILDER(Attribute);
1084 IMPL_XMLOBJECTBUILDER(AttributeDesignator);
1085 IMPL_XMLOBJECTBUILDER(AttributeStatement);
1086 IMPL_XMLOBJECTBUILDER(AttributeValue);
1087 IMPL_XMLOBJECTBUILDER(Audience);
1088 IMPL_XMLOBJECTBUILDER(AudienceRestrictionCondition);
1089 IMPL_XMLOBJECTBUILDER(AuthenticationStatement);
1090 IMPL_XMLOBJECTBUILDER(AuthorizationDecisionStatement);
1091 IMPL_XMLOBJECTBUILDER(AuthorityBinding);
1092 IMPL_XMLOBJECTBUILDER(Conditions);
1093 IMPL_XMLOBJECTBUILDER(ConfirmationMethod);
1094 IMPL_XMLOBJECTBUILDER(DoNotCacheCondition);
1095 IMPL_XMLOBJECTBUILDER(Evidence);
1096 IMPL_XMLOBJECTBUILDER(NameIdentifier);
1097 IMPL_XMLOBJECTBUILDER(Subject);
1098 IMPL_XMLOBJECTBUILDER(SubjectConfirmation);
1099 IMPL_XMLOBJECTBUILDER(SubjectConfirmationData);
1100 IMPL_XMLOBJECTBUILDER(SubjectLocality);
1103 const XMLCh Action::LOCAL_NAME[] = UNICODE_LITERAL_6(A,c,t,i,o,n);
1104 const XMLCh Action::TYPE_NAME[] = UNICODE_LITERAL_10(A,c,t,i,o,n,T,y,p,e);
1105 const XMLCh Action::NAMESPACE_ATTRIB_NAME[] = UNICODE_LITERAL_9(N,a,m,e,s,p,a,c,e);
1106 const XMLCh Advice::LOCAL_NAME[] = UNICODE_LITERAL_6(A,d,v,i,c,e);
1107 const XMLCh Advice::TYPE_NAME[] = UNICODE_LITERAL_10(A,d,v,i,c,e,T,y,p,e);
1108 const XMLCh Assertion::LOCAL_NAME[] = UNICODE_LITERAL_9(A,s,s,e,r,t,i,o,n);
1109 const XMLCh Assertion::TYPE_NAME[] = UNICODE_LITERAL_13(A,s,s,e,r,t,i,o,n,T,y,p,e);
1110 const XMLCh Assertion::MINORVERSION_ATTRIB_NAME[] = UNICODE_LITERAL_12(M,i,n,o,r,V,e,r,s,i,o,n);
1111 const XMLCh Assertion::ASSERTIONID_ATTRIB_NAME[] = UNICODE_LITERAL_11(A,s,s,e,r,t,i,o,n,I,D);
1112 const XMLCh Assertion::ISSUER_ATTRIB_NAME[] = UNICODE_LITERAL_6(I,s,s,u,e,r);
1113 const XMLCh Assertion::ISSUEINSTANT_ATTRIB_NAME[] = UNICODE_LITERAL_12(I,s,s,u,e,I,n,s,t,a,n,t);
1114 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);
1115 const XMLCh Attribute::LOCAL_NAME[] = UNICODE_LITERAL_9(A,t,t,r,i,b,u,t,e);
1116 const XMLCh Attribute::TYPE_NAME[] = UNICODE_LITERAL_13(A,t,t,r,i,b,u,t,e,T,y,p,e);
1117 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);
1118 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);
1119 const XMLCh AttributeDesignator::ATTRIBUTENAME_ATTRIB_NAME[] = UNICODE_LITERAL_13(A,t,t,r,i,b,u,t,e,N,a,m,e);
1120 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);
1121 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);
1122 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);
1123 const XMLCh AttributeValue::LOCAL_NAME[] = UNICODE_LITERAL_14(A,t,t,r,i,b,u,t,e,V,a,l,u,e);
1124 const XMLCh Audience::LOCAL_NAME[] = UNICODE_LITERAL_8(A,u,d,i,e,n,c,e);
1125 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);
1126 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);
1127 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);
1128 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);
1129 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);
1130 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);
1131 const XMLCh AuthorityBinding::LOCAL_NAME[] = UNICODE_LITERAL_16(A,u,t,h,o,r,i,t,y,B,i,n,d,i,n,g);
1132 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);
1133 const XMLCh AuthorityBinding::AUTHORITYKIND_ATTRIB_NAME[] = UNICODE_LITERAL_13(A,u,t,h,o,r,i,t,y,K,i,n,d);
1134 const XMLCh AuthorityBinding::LOCATION_ATTRIB_NAME[] = UNICODE_LITERAL_8(L,o,c,a,t,i,o,n);
1135 const XMLCh AuthorityBinding::BINDING_ATTRIB_NAME[] = UNICODE_LITERAL_7(B,i,n,d,i,n,g);
1136 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);
1137 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);
1138 const XMLCh AuthorizationDecisionStatement::RESOURCE_ATTRIB_NAME[] = UNICODE_LITERAL_8(R,e,s,o,u,r,c,e);
1139 const XMLCh AuthorizationDecisionStatement::DECISION_ATTRIB_NAME[] = UNICODE_LITERAL_8(D,e,c,i,s,i,o,n);
1140 const XMLCh AuthorizationDecisionStatement::DECISION_PERMIT[] = UNICODE_LITERAL_6(P,e,r,m,i,t);
1141 const XMLCh AuthorizationDecisionStatement::DECISION_DENY[] = UNICODE_LITERAL_4(D,e,n,y);
1142 const XMLCh AuthorizationDecisionStatement::DECISION_INDETERMINATE[] = UNICODE_LITERAL_13(I,n,d,e,t,e,r,m,i,n,a,t,e);
1143 const XMLCh Condition::LOCAL_NAME[] = UNICODE_LITERAL_9(C,o,n,d,i,t,i,o,n);
1144 const XMLCh Conditions::LOCAL_NAME[] = UNICODE_LITERAL_10(C,o,n,d,i,t,i,o,n,s);
1145 const XMLCh Conditions::TYPE_NAME[] = UNICODE_LITERAL_14(C,o,n,d,i,t,i,o,n,s,T,y,p,e);
1146 const XMLCh Conditions::NOTBEFORE_ATTRIB_NAME[] = UNICODE_LITERAL_9(N,o,t,B,e,f,o,r,e);
1147 const XMLCh Conditions::NOTONORAFTER_ATTRIB_NAME[] =UNICODE_LITERAL_12(N,o,t,O,n,O,r,A,f,t,e,r);
1148 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);
1149 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);
1150 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);
1151 const XMLCh Evidence::LOCAL_NAME[] = UNICODE_LITERAL_8(E,v,i,d,e,n,c,e);
1152 const XMLCh Evidence::TYPE_NAME[] = UNICODE_LITERAL_12(E,v,i,d,e,n,c,e,T,y,p,e);
1153 const XMLCh NameIdentifier::LOCAL_NAME[] = UNICODE_LITERAL_14(N,a,m,e,I,d,e,n,t,i,f,i,e,r);
1154 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);
1155 const XMLCh NameIdentifier::NAMEQUALIFIER_ATTRIB_NAME[] = UNICODE_LITERAL_13(N,a,m,e,Q,u,a,l,i,f,i,e,r);
1156 const XMLCh NameIdentifier::FORMAT_ATTRIB_NAME[] = UNICODE_LITERAL_6(F,o,r,m,a,t);
1157 const XMLCh Statement::LOCAL_NAME[] = UNICODE_LITERAL_9(S,t,a,t,e,m,e,n,t);
1158 const XMLCh Subject::LOCAL_NAME[] = UNICODE_LITERAL_7(S,u,b,j,e,c,t);
1159 const XMLCh Subject::TYPE_NAME[] = UNICODE_LITERAL_11(S,u,b,j,e,c,t,T,y,p,e);
1160 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);
1161 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);
1162 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);
1163 const XMLCh SubjectLocality::LOCAL_NAME[] = UNICODE_LITERAL_15(S,u,b,j,e,c,t,L,o,c,a,l,i,t,y);
1164 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);
1165 const XMLCh SubjectLocality::IPADDRESS_ATTRIB_NAME[] = UNICODE_LITERAL_9(I,P,A,d,d,r,e,s,s);
1166 const XMLCh SubjectLocality::DNSADDRESS_ATTRIB_NAME[] = UNICODE_LITERAL_10(D,N,S,A,d,d,r,e,s,s);
1167 const XMLCh SubjectStatement::LOCAL_NAME[] = UNICODE_LITERAL_16(S,u,b,j,e,c,t,S,t,a,t,e,m,e,n,t);
1169 const XMLCh NameIdentifier::UNSPECIFIED[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified
1170 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1171 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1172 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1173 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1174 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1175 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
1178 const XMLCh NameIdentifier::EMAIL[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress
1179 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1180 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1181 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1182 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1183 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1184 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
1187 const XMLCh NameIdentifier::X509_SUBJECT[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName
1188 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1189 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1190 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1191 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1192 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1193 chLatin_X, chDigit_5, chDigit_0, chDigit_9, chLatin_S, chLatin_u, chLatin_b, chLatin_j, chLatin_e, chLatin_c, chLatin_t,
1194 chLatin_N, chLatin_a, chLatin_m, chLatin_e, chNull
1197 const XMLCh NameIdentifier::WIN_DOMAIN_QUALIFIED[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName
1198 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1199 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1200 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1201 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1202 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1203 chLatin_W, chLatin_i, chLatin_n, chLatin_d, chLatin_o, chLatin_w, chLatin_s,
1204 chLatin_D, chLatin_o, chLatin_m, chLatin_a, chLatin_i, chLatin_n,
1205 chLatin_Q, chLatin_u, chLatin_a, chLatin_l, chLatin_i, chLatin_f, chLatin_i, chLatin_e, chLatin_d,
1206 chLatin_N, chLatin_a, chLatin_m, chLatin_e, chNull
1209 const XMLCh SubjectConfirmation::ARTIFACT01[] = // urn:oasis:names:tc:SAML:1.0:cm:artifact-01
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_0, chColon,
1213 chLatin_c, chLatin_m, chColon, chLatin_a, chLatin_r, chLatin_t, chLatin_i, chLatin_f, chLatin_a, chLatin_c, chLatin_t,
1214 chDash, chDigit_0, chDigit_1, chNull
1217 const XMLCh SubjectConfirmation::ARTIFACT[] = // urn:oasis:names:tc:SAML:1.0:cm:artifact
1218 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1219 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1220 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1221 chLatin_c, chLatin_m, chColon, chLatin_a, chLatin_r, chLatin_t, chLatin_i, chLatin_f, chLatin_a, chLatin_c, chLatin_t, chNull
1224 const XMLCh SubjectConfirmation::BEARER[] = // urn:oasis:names:tc:SAML:1.0:cm:bearer
1225 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1226 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1227 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1228 chLatin_c, chLatin_m, chColon, chLatin_b, chLatin_e, chLatin_a, chLatin_r, chLatin_e, chLatin_r, chNull
1231 const XMLCh SubjectConfirmation::HOLDER_KEY[] = // urn:oasis:names:tc:SAML:1.0:cm:holder-of-key
1232 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1233 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1234 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1235 chLatin_c, chLatin_m, chColon, chLatin_h, chLatin_o, chLatin_l, chLatin_d, chLatin_e, chLatin_r, chDash,
1236 chLatin_o, chLatin_f, chDash, chLatin_k, chLatin_e, chLatin_y, chNull
1239 const XMLCh SubjectConfirmation::SENDER_VOUCHES[] = // urn:oasis:names:tc:SAML:1.0:cm:sender-vouches
1240 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1241 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1242 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1243 chLatin_c, chLatin_m, chColon, chLatin_s, chLatin_e, chLatin_n, chLatin_d, chLatin_e, chLatin_r, chDash,
1244 chLatin_v, chLatin_o, chLatin_u, chLatin_c, chLatin_h, chLatin_e, chLatin_s, chNull
1247 const XMLCh Action::RWEDC_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:rwedc
1248 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1249 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1250 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1251 chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1252 chLatin_r, chLatin_w, chLatin_e, chLatin_d, chLatin_c, chNull
1255 const XMLCh Action::RWEDC_NEG_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:rwedc-negation
1256 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1257 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1258 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1259 chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1260 chLatin_r, chLatin_w, chLatin_e, chLatin_d, chLatin_c, chDash,
1261 chLatin_n, chLatin_e, chLatin_g, chLatin_a, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chNull
1264 const XMLCh Action::GHPP_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:ghpp
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_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1269 chLatin_g, chLatin_h, chLatin_p, chLatin_p, chNull
1272 const XMLCh Action::UNIX_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:unix
1273 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1274 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1275 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1276 chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1277 chLatin_u, chLatin_n, chLatin_i, chLatin_x, chNull