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;
45 #if defined (_MSC_VER)
46 #pragma warning( push )
47 #pragma warning( disable : 4250 4251 )
53 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AssertionIDReference);
54 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,Audience);
55 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,ConfirmationMethod);
57 class SAML_DLLLOCAL AudienceRestrictionConditionImpl : public virtual AudienceRestrictionCondition,
58 public AbstractComplexElement,
59 public AbstractDOMCachingXMLObject,
60 public AbstractXMLObjectMarshaller,
61 public AbstractXMLObjectUnmarshaller
64 virtual ~AudienceRestrictionConditionImpl() {}
66 AudienceRestrictionConditionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
67 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
70 AudienceRestrictionConditionImpl(const AudienceRestrictionConditionImpl& src)
71 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
72 VectorOf(Audience) v=getAudiences();
73 for (vector<Audience*>::const_iterator i=src.m_Audiences.begin(); i!=src.m_Audiences.end(); i++) {
75 v.push_back((*i)->cloneAudience());
80 IMPL_XMLOBJECT_CLONE(AudienceRestrictionCondition);
81 Condition* cloneCondition() const {
82 return cloneAudienceRestrictionCondition();
84 IMPL_TYPED_CHILDREN(Audience,m_children.end());
87 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
88 PROC_TYPED_CHILDREN(Audience,SAMLConstants::SAML1_NS,false);
89 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
93 class SAML_DLLLOCAL DoNotCacheConditionImpl : public virtual DoNotCacheCondition,
94 public AbstractSimpleElement,
95 public AbstractDOMCachingXMLObject,
96 public AbstractXMLObjectMarshaller,
97 public AbstractXMLObjectUnmarshaller
100 virtual ~DoNotCacheConditionImpl() {}
102 DoNotCacheConditionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
103 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
106 DoNotCacheConditionImpl(const DoNotCacheConditionImpl& src)
107 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
110 IMPL_XMLOBJECT_CLONE(DoNotCacheCondition);
111 Condition* cloneCondition() const {
112 return cloneDoNotCacheCondition();
116 class SAML_DLLLOCAL ConditionsImpl : public virtual Conditions,
117 public AbstractComplexElement,
118 public AbstractDOMCachingXMLObject,
119 public AbstractXMLObjectMarshaller,
120 public AbstractXMLObjectUnmarshaller
123 virtual ~ConditionsImpl() {
125 delete m_NotOnOrAfter;
128 ConditionsImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
129 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
133 ConditionsImpl(const ConditionsImpl& src)
134 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
136 setNotBefore(src.getNotBefore());
137 setNotOnOrAfter(src.getNotOnOrAfter());
139 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
141 AudienceRestrictionCondition* arc=dynamic_cast<AudienceRestrictionCondition*>(*i);
143 getAudienceRestrictionConditions().push_back(arc->cloneAudienceRestrictionCondition());
147 DoNotCacheCondition* dncc=dynamic_cast<DoNotCacheCondition*>(*i);
149 getDoNotCacheConditions().push_back(dncc->cloneDoNotCacheCondition());
153 Condition* c=dynamic_cast<Condition*>(*i);
155 getConditions().push_back(c->cloneCondition());
163 m_NotBefore=m_NotOnOrAfter=NULL;
166 IMPL_XMLOBJECT_CLONE(Conditions);
167 IMPL_DATETIME_ATTRIB(NotBefore,0);
168 IMPL_DATETIME_ATTRIB(NotOnOrAfter,SAMLTIME_MAX);
169 IMPL_TYPED_CHILDREN(AudienceRestrictionCondition, m_children.end());
170 IMPL_TYPED_CHILDREN(DoNotCacheCondition,m_children.end());
171 IMPL_TYPED_CHILDREN(Condition,m_children.end());
174 void marshallAttributes(DOMElement* domElement) const {
175 MARSHALL_DATETIME_ATTRIB(NotBefore,NOTBEFORE,NULL);
176 MARSHALL_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,NULL);
179 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
180 PROC_TYPED_CHILDREN(AudienceRestrictionCondition,SAMLConstants::SAML1_NS,true);
181 PROC_TYPED_CHILDREN(DoNotCacheCondition,SAMLConstants::SAML1_NS,true);
182 PROC_TYPED_CHILDREN(Condition,SAMLConstants::SAML1_NS,true);
183 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
186 void processAttribute(const DOMAttr* attribute) {
187 PROC_DATETIME_ATTRIB(NotBefore,NOTBEFORE,NULL);
188 PROC_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,NULL);
192 class SAML_DLLLOCAL NameIdentifierImpl : public virtual NameIdentifier,
193 public AbstractSimpleElement,
194 public AbstractDOMCachingXMLObject,
195 public AbstractXMLObjectMarshaller,
196 public AbstractXMLObjectUnmarshaller
199 virtual ~NameIdentifierImpl() {
200 XMLString::release(&m_Format);
201 XMLString::release(&m_NameQualifier);
204 NameIdentifierImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
205 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
209 NameIdentifierImpl(const NameIdentifierImpl& src)
210 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
212 setFormat(src.getFormat());
213 setNameQualifier(src.getNameQualifier());
217 m_Format=m_NameQualifier=NULL;
220 IMPL_XMLOBJECT_CLONE(NameIdentifier);
221 IMPL_STRING_ATTRIB(Format);
222 IMPL_STRING_ATTRIB(NameQualifier);
225 void marshallAttributes(DOMElement* domElement) const {
226 MARSHALL_STRING_ATTRIB(Format,FORMAT,NULL);
227 MARSHALL_STRING_ATTRIB(NameQualifier,NAMEQUALIFIER,NULL);
230 void processAttribute(const DOMAttr* attribute) {
231 PROC_STRING_ATTRIB(Format,FORMAT,NULL);
232 PROC_STRING_ATTRIB(NameQualifier,NAMEQUALIFIER,NULL);
236 class SAML_DLLLOCAL SubjectConfirmationDataImpl : public virtual SubjectConfirmationData, public AnyElementImpl
239 virtual ~SubjectConfirmationDataImpl() {}
241 SubjectConfirmationDataImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
242 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
245 SubjectConfirmationDataImpl(const SubjectConfirmationDataImpl& src) : AnyElementImpl(src) {
248 IMPL_XMLOBJECT_CLONE(SubjectConfirmationData);
251 class SAML_DLLLOCAL SubjectConfirmationImpl : public virtual SubjectConfirmation,
252 public AbstractComplexElement,
253 public AbstractDOMCachingXMLObject,
254 public AbstractXMLObjectMarshaller,
255 public AbstractXMLObjectUnmarshaller
258 virtual ~SubjectConfirmationImpl() {}
260 SubjectConfirmationImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
261 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
265 SubjectConfirmationImpl(const SubjectConfirmationImpl& src)
266 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
268 if (src.getSubjectConfirmationData())
269 setSubjectConfirmationData(src.getSubjectConfirmationData()->clone());
270 if (src.getKeyInfo())
271 setKeyInfo(src.getKeyInfo()->cloneKeyInfo());
272 VectorOf(ConfirmationMethod) v=getConfirmationMethods();
273 for (vector<ConfirmationMethod*>::const_iterator i=src.m_ConfirmationMethods.begin(); i!=src.m_ConfirmationMethods.end(); i++) {
275 v.push_back((*i)->cloneConfirmationMethod());
281 m_SubjectConfirmationData=NULL;
283 m_children.push_back(NULL);
284 m_children.push_back(NULL);
285 m_pos_SubjectConfirmationData=m_children.begin();
286 m_pos_KeyInfo=m_pos_SubjectConfirmationData;
290 IMPL_XMLOBJECT_CLONE(SubjectConfirmation);
291 IMPL_TYPED_CHILDREN(ConfirmationMethod,m_pos_SubjectConfirmationData);
292 IMPL_XMLOBJECT_CHILD(SubjectConfirmationData);
293 IMPL_TYPED_CHILD(KeyInfo);
296 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
297 PROC_TYPED_CHILDREN(ConfirmationMethod,SAMLConstants::SAML1_NS,false);
298 PROC_TYPED_CHILD(KeyInfo,XMLConstants::XMLSIG_NS,false);
300 // Anything else we'll assume is the data.
301 if (getSubjectConfirmationData())
302 throw UnmarshallingException("Invalid child element: $1",params(1,childXMLObject->getElementQName().toString().c_str()));
303 setSubjectConfirmationData(childXMLObject);
307 class SAML_DLLLOCAL SubjectImpl : public virtual Subject,
308 public AbstractComplexElement,
309 public AbstractDOMCachingXMLObject,
310 public AbstractXMLObjectMarshaller,
311 public AbstractXMLObjectUnmarshaller
314 virtual ~SubjectImpl() {}
316 SubjectImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
317 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
321 SubjectImpl(const SubjectImpl& src)
322 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
324 if (src.getNameIdentifier())
325 setNameIdentifier(src.getNameIdentifier()->cloneNameIdentifier());
326 if (src.getSubjectConfirmation())
327 setSubjectConfirmation(src.getSubjectConfirmation()->cloneSubjectConfirmation());
331 m_NameIdentifier=NULL;
332 m_SubjectConfirmation=NULL;
333 m_children.push_back(NULL);
334 m_children.push_back(NULL);
335 m_pos_NameIdentifier=m_children.begin();
336 m_pos_SubjectConfirmation=m_pos_NameIdentifier;
337 ++m_pos_SubjectConfirmation;
340 IMPL_XMLOBJECT_CLONE(Subject);
341 IMPL_TYPED_CHILD(NameIdentifier);
342 IMPL_TYPED_CHILD(SubjectConfirmation);
345 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
346 PROC_TYPED_CHILD(NameIdentifier,SAMLConstants::SAML1_NS,true);
347 PROC_TYPED_CHILD(SubjectConfirmation,SAMLConstants::SAML1_NS,true);
348 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
352 class SAML_DLLLOCAL SubjectStatementImpl : public virtual SubjectStatement,
353 public AbstractComplexElement,
354 public AbstractDOMCachingXMLObject,
355 public AbstractXMLObjectMarshaller,
356 public AbstractXMLObjectUnmarshaller
360 m_children.push_back(NULL);
361 m_pos_Subject=m_children.begin();
364 SubjectStatementImpl() {
368 virtual ~SubjectStatementImpl() {}
370 SubjectStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
371 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
375 SubjectStatementImpl(const SubjectStatementImpl& src)
376 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
378 if (src.getSubject())
379 setSubject(src.getSubject()->cloneSubject());
382 IMPL_TYPED_CHILD(Subject);
385 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
386 PROC_TYPED_CHILD(Subject,SAMLConstants::SAML1_NS,true);
387 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
391 class SAML_DLLLOCAL SubjectLocalityImpl : public virtual SubjectLocality,
392 public AbstractSimpleElement,
393 public AbstractDOMCachingXMLObject,
394 public AbstractXMLObjectMarshaller,
395 public AbstractXMLObjectUnmarshaller
398 virtual ~SubjectLocalityImpl() {
399 XMLString::release(&m_IPAddress);
400 XMLString::release(&m_DNSAddress);
403 SubjectLocalityImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
404 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
408 SubjectLocalityImpl(const SubjectLocalityImpl& src)
409 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
411 setIPAddress(src.getIPAddress());
412 setDNSAddress(src.getDNSAddress());
416 m_IPAddress=m_DNSAddress=NULL;
419 IMPL_XMLOBJECT_CLONE(SubjectLocality);
420 IMPL_STRING_ATTRIB(IPAddress);
421 IMPL_STRING_ATTRIB(DNSAddress);
424 void marshallAttributes(DOMElement* domElement) const {
425 MARSHALL_STRING_ATTRIB(IPAddress,IPADDRESS,NULL);
426 MARSHALL_STRING_ATTRIB(DNSAddress,DNSADDRESS,NULL);
429 void processAttribute(const DOMAttr* attribute) {
430 PROC_STRING_ATTRIB(IPAddress,IPADDRESS,NULL);
431 PROC_STRING_ATTRIB(DNSAddress,DNSADDRESS,NULL);
435 class SAML_DLLLOCAL AuthorityBindingImpl : public virtual AuthorityBinding,
436 public AbstractSimpleElement,
437 public AbstractDOMCachingXMLObject,
438 public AbstractXMLObjectMarshaller,
439 public AbstractXMLObjectUnmarshaller
442 virtual ~AuthorityBindingImpl() {
443 delete m_AuthorityKind;
444 XMLString::release(&m_Location);
445 XMLString::release(&m_Binding);
448 AuthorityBindingImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
449 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
453 AuthorityBindingImpl(const AuthorityBindingImpl& src)
454 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
456 setAuthorityKind(src.getAuthorityKind());
457 setLocation(src.getLocation());
458 setBinding(src.getBinding());
462 m_AuthorityKind=NULL;
463 m_Location=m_Binding=NULL;
466 IMPL_XMLOBJECT_CLONE(AuthorityBinding);
467 IMPL_XMLOBJECT_ATTRIB(AuthorityKind,QName);
468 IMPL_STRING_ATTRIB(Location);
469 IMPL_STRING_ATTRIB(Binding);
472 void marshallAttributes(DOMElement* domElement) const {
473 MARSHALL_QNAME_ATTRIB(AuthorityKind,AUTHORITYKIND,NULL);
474 MARSHALL_STRING_ATTRIB(Location,LOCATION,NULL);
475 MARSHALL_STRING_ATTRIB(Binding,BINDING,NULL);
478 void processAttribute(const DOMAttr* attribute) {
479 PROC_QNAME_ATTRIB(AuthorityKind,AUTHORITYKIND,NULL);
480 PROC_STRING_ATTRIB(Location,LOCATION,NULL);
481 PROC_STRING_ATTRIB(Binding,BINDING,NULL);
485 class SAML_DLLLOCAL AuthenticationStatementImpl : public virtual AuthenticationStatement, public SubjectStatementImpl
488 virtual ~AuthenticationStatementImpl() {
489 XMLString::release(&m_AuthenticationMethod);
490 delete m_AuthenticationInstant;
493 AuthenticationStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
494 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
498 AuthenticationStatementImpl(const AuthenticationStatementImpl& src) : AbstractXMLObject(src), SubjectStatementImpl(src) {
500 setAuthenticationMethod(src.getAuthenticationMethod());
501 setAuthenticationInstant(src.getAuthenticationInstant());
502 if (src.getSubjectLocality())
503 setSubjectLocality(src.getSubjectLocality()->cloneSubjectLocality());
504 VectorOf(AuthorityBinding) v=getAuthorityBindings();
505 for (vector<AuthorityBinding*>::const_iterator i=src.m_AuthorityBindings.begin(); i!=src.m_AuthorityBindings.end(); i++) {
507 v.push_back((*i)->cloneAuthorityBinding());
513 m_AuthenticationMethod=NULL;
514 m_AuthenticationInstant=NULL;
515 m_SubjectLocality=NULL;
516 m_children.push_back(NULL);
517 m_pos_SubjectLocality=m_pos_Subject;
518 ++m_pos_SubjectLocality;
521 IMPL_XMLOBJECT_CLONE(AuthenticationStatement);
522 SubjectStatement* cloneSubjectStatement() const {
523 return cloneAuthenticationStatement();
525 Statement* cloneStatement() const {
526 return cloneAuthenticationStatement();
528 IMPL_STRING_ATTRIB(AuthenticationMethod);
529 IMPL_DATETIME_ATTRIB(AuthenticationInstant,0);
530 IMPL_TYPED_CHILD(SubjectLocality);
531 IMPL_TYPED_CHILDREN(AuthorityBinding, m_children.end());
534 void marshallAttributes(DOMElement* domElement) const {
535 MARSHALL_STRING_ATTRIB(AuthenticationMethod,AUTHENTICATIONMETHOD,NULL);
536 MARSHALL_DATETIME_ATTRIB(AuthenticationInstant,AUTHENTICATIONINSTANT,NULL);
537 SubjectStatementImpl::marshallAttributes(domElement);
540 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
541 PROC_TYPED_CHILD(SubjectLocality,SAMLConstants::SAML1_NS,false);
542 PROC_TYPED_CHILDREN(AuthorityBinding,SAMLConstants::SAML1_NS,false);
543 SubjectStatementImpl::processChildElement(childXMLObject,root);
546 void processAttribute(const DOMAttr* attribute) {
547 PROC_STRING_ATTRIB(AuthenticationMethod,AUTHENTICATIONMETHOD,NULL);
548 PROC_DATETIME_ATTRIB(AuthenticationInstant,AUTHENTICATIONINSTANT,NULL);
549 SubjectStatementImpl::processAttribute(attribute);
553 class SAML_DLLLOCAL ActionImpl : public virtual Action,
554 public AbstractSimpleElement,
555 public AbstractDOMCachingXMLObject,
556 public AbstractXMLObjectMarshaller,
557 public AbstractXMLObjectUnmarshaller
560 virtual ~ActionImpl() {
561 XMLString::release(&m_Namespace);
564 ActionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
565 : AbstractXMLObject(nsURI, localName, prefix, schemaType), m_Namespace(NULL) {
568 ActionImpl(const ActionImpl& src) : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
569 setNamespace(src.getNamespace());
572 IMPL_XMLOBJECT_CLONE(Action);
573 IMPL_STRING_ATTRIB(Namespace);
576 void marshallAttributes(DOMElement* domElement) const {
577 MARSHALL_STRING_ATTRIB(Namespace,NAMESPACE,NULL);
580 void processAttribute(const DOMAttr* attribute) {
581 PROC_STRING_ATTRIB(Namespace,NAMESPACE,NULL);
585 class SAML_DLLLOCAL EvidenceImpl : public virtual Evidence,
586 public AbstractComplexElement,
587 public AbstractDOMCachingXMLObject,
588 public AbstractXMLObjectMarshaller,
589 public AbstractXMLObjectUnmarshaller
592 virtual ~EvidenceImpl() {}
594 EvidenceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
595 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
598 EvidenceImpl(const EvidenceImpl& src)
599 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
600 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
602 AssertionIDReference* ref=dynamic_cast<AssertionIDReference*>(*i);
604 getAssertionIDReferences().push_back(ref->cloneAssertionIDReference());
608 Assertion* assertion=dynamic_cast<Assertion*>(*i);
610 getAssertions().push_back(assertion->cloneAssertion());
617 IMPL_XMLOBJECT_CLONE(Evidence);
618 IMPL_TYPED_CHILDREN(AssertionIDReference,m_children.end());
619 IMPL_TYPED_CHILDREN(Assertion,m_children.end());
622 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
623 PROC_TYPED_CHILDREN(AssertionIDReference,SAMLConstants::SAML1_NS,false);
624 PROC_TYPED_CHILDREN(Assertion,SAMLConstants::SAML1_NS,true);
625 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
629 class SAML_DLLLOCAL AuthorizationDecisionStatementImpl
630 : public virtual AuthorizationDecisionStatement, public SubjectStatementImpl
633 virtual ~AuthorizationDecisionStatementImpl() {
634 XMLString::release(&m_Resource);
635 XMLString::release(&m_Decision);
638 AuthorizationDecisionStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
639 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
643 AuthorizationDecisionStatementImpl(const AuthorizationDecisionStatementImpl& src)
644 : AbstractXMLObject(src), SubjectStatementImpl(src) {
646 setResource(src.getResource());
647 setDecision(src.getDecision());
648 if (src.getEvidence())
649 setEvidence(src.getEvidence()->cloneEvidence());
650 VectorOf(Action) v=getActions();
651 for (vector<Action*>::const_iterator i=src.m_Actions.begin(); i!=src.m_Actions.end(); i++) {
653 v.push_back((*i)->cloneAction());
662 m_children.push_back(NULL);
663 m_pos_Evidence=m_pos_Subject;
667 IMPL_XMLOBJECT_CLONE(AuthorizationDecisionStatement);
668 SubjectStatement* cloneSubjectStatement() const {
669 return cloneAuthorizationDecisionStatement();
671 Statement* cloneStatement() const {
672 return cloneAuthorizationDecisionStatement();
674 IMPL_STRING_ATTRIB(Resource);
675 IMPL_STRING_ATTRIB(Decision);
676 IMPL_TYPED_CHILD(Evidence);
677 IMPL_TYPED_CHILDREN(Action, m_pos_Evidence);
680 void marshallAttributes(DOMElement* domElement) const {
681 MARSHALL_STRING_ATTRIB(Resource,RESOURCE,NULL);
682 MARSHALL_STRING_ATTRIB(Decision,DECISION,NULL);
683 SubjectStatementImpl::marshallAttributes(domElement);
686 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
687 PROC_TYPED_CHILD(Evidence,SAMLConstants::SAML1_NS,false);
688 PROC_TYPED_CHILDREN(Action,SAMLConstants::SAML1_NS,false);
689 SubjectStatementImpl::processChildElement(childXMLObject,root);
692 void processAttribute(const DOMAttr* attribute) {
693 PROC_STRING_ATTRIB(Resource,RESOURCE,NULL);
694 PROC_STRING_ATTRIB(Decision,DECISION,NULL);
695 SubjectStatementImpl::processAttribute(attribute);
699 class SAML_DLLLOCAL AttributeDesignatorImpl : public virtual AttributeDesignator,
700 public AbstractSimpleElement,
701 public AbstractDOMCachingXMLObject,
702 public AbstractXMLObjectMarshaller,
703 public AbstractXMLObjectUnmarshaller
706 virtual ~AttributeDesignatorImpl() {
707 XMLString::release(&m_AttributeName);
708 XMLString::release(&m_AttributeNamespace);
711 AttributeDesignatorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
712 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
716 AttributeDesignatorImpl(const AttributeDesignatorImpl& src)
717 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
719 setAttributeName(src.getAttributeName());
720 setAttributeNamespace(src.getAttributeNamespace());
724 m_AttributeName=m_AttributeNamespace=NULL;
727 IMPL_XMLOBJECT_CLONE(AttributeDesignator);
728 IMPL_STRING_ATTRIB(AttributeName);
729 IMPL_STRING_ATTRIB(AttributeNamespace);
732 void marshallAttributes(DOMElement* domElement) const {
733 MARSHALL_STRING_ATTRIB(AttributeName,ATTRIBUTENAME,NULL);
734 MARSHALL_STRING_ATTRIB(AttributeNamespace,ATTRIBUTENAMESPACE,NULL);
737 void processAttribute(const DOMAttr* attribute) {
738 PROC_STRING_ATTRIB(AttributeName,ATTRIBUTENAME,NULL);
739 PROC_STRING_ATTRIB(AttributeNamespace,ATTRIBUTENAMESPACE,NULL);
743 class SAML_DLLLOCAL AttributeImpl : public virtual Attribute,
744 public AbstractComplexElement,
745 public AbstractDOMCachingXMLObject,
746 public AbstractXMLObjectMarshaller,
747 public AbstractXMLObjectUnmarshaller
750 virtual ~AttributeImpl() {
751 XMLString::release(&m_AttributeName);
752 XMLString::release(&m_AttributeNamespace);
755 AttributeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
756 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
760 AttributeImpl(const AttributeImpl& src)
761 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
763 setAttributeName(src.getAttributeName());
764 setAttributeNamespace(src.getAttributeNamespace());
765 VectorOf(XMLObject) v=getAttributeValues();
766 for (vector<XMLObject*>::const_iterator i=src.m_AttributeValues.begin(); i!=src.m_AttributeValues.end(); i++) {
768 v.push_back((*i)->clone());
774 m_AttributeName=m_AttributeNamespace=NULL;
777 IMPL_XMLOBJECT_CLONE(Attribute);
778 AttributeDesignator* cloneAttributeDesignator() const {
779 return cloneAttribute();
781 IMPL_STRING_ATTRIB(AttributeName);
782 IMPL_STRING_ATTRIB(AttributeNamespace);
783 IMPL_XMLOBJECT_CHILDREN(AttributeValue,m_children.end());
786 void marshallAttributes(DOMElement* domElement) const {
787 MARSHALL_STRING_ATTRIB(AttributeName,ATTRIBUTENAME,NULL);
788 MARSHALL_STRING_ATTRIB(AttributeNamespace,ATTRIBUTENAMESPACE,NULL);
791 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
792 getAttributeValues().push_back(childXMLObject);
795 void processAttribute(const DOMAttr* attribute) {
796 PROC_STRING_ATTRIB(AttributeName,ATTRIBUTENAME,NULL);
797 PROC_STRING_ATTRIB(AttributeNamespace,ATTRIBUTENAMESPACE,NULL);
801 class SAML_DLLLOCAL AttributeValueImpl : public virtual AttributeValue, public AnyElementImpl
804 virtual ~AttributeValueImpl() {}
806 AttributeValueImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
807 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
810 AttributeValueImpl(const AttributeValueImpl& src) : AnyElementImpl(src) {}
812 IMPL_XMLOBJECT_CLONE(AttributeValue);
815 class SAML_DLLLOCAL AttributeStatementImpl : public virtual AttributeStatement, public SubjectStatementImpl
818 virtual ~AttributeStatementImpl() {}
820 AttributeStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
821 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
824 AttributeStatementImpl(const AttributeStatementImpl& src)
825 : AbstractXMLObject(src), SubjectStatementImpl(src) {
826 VectorOf(Attribute) v=getAttributes();
827 for (vector<Attribute*>::const_iterator i=src.m_Attributes.begin(); i!=src.m_Attributes.end(); i++) {
829 v.push_back((*i)->cloneAttribute());
834 IMPL_XMLOBJECT_CLONE(AttributeStatement);
835 SubjectStatement* cloneSubjectStatement() const {
836 return cloneAttributeStatement();
838 Statement* cloneStatement() const {
839 return cloneAttributeStatement();
841 IMPL_TYPED_CHILDREN(Attribute, m_children.end());
844 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
845 PROC_TYPED_CHILDREN(Attribute,SAMLConstants::SAML1_NS,true);
846 SubjectStatementImpl::processChildElement(childXMLObject,root);
850 class SAML_DLLLOCAL AdviceImpl : public virtual Advice,
851 public AbstractComplexElement,
852 public AbstractDOMCachingXMLObject,
853 public AbstractXMLObjectMarshaller,
854 public AbstractXMLObjectUnmarshaller
857 virtual ~AdviceImpl() {}
859 AdviceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
860 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
863 AdviceImpl(const AdviceImpl& src)
864 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
865 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
867 AssertionIDReference* ref=dynamic_cast<AssertionIDReference*>(*i);
869 getAssertionIDReferences().push_back(ref->cloneAssertionIDReference());
873 Assertion* assertion=dynamic_cast<Assertion*>(*i);
875 getAssertions().push_back(assertion->cloneAssertion());
879 getOthers().push_back((*i)->clone());
884 IMPL_XMLOBJECT_CLONE(Advice);
885 IMPL_TYPED_CHILDREN(AssertionIDReference,m_children.end());
886 IMPL_TYPED_CHILDREN(Assertion,m_children.end());
887 IMPL_XMLOBJECT_CHILDREN(Other,m_children.end());
890 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
891 PROC_TYPED_CHILDREN(AssertionIDReference,SAMLConstants::SAML1_NS,false);
892 PROC_TYPED_CHILDREN(Assertion,SAMLConstants::SAML1_NS,true);
895 const XMLCh* nsURI=root->getNamespaceURI();
896 if (!XMLString::equals(nsURI,SAMLConstants::SAML1_NS) && nsURI && *nsURI) {
897 getOthers().push_back(childXMLObject);
901 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
905 class SAML_DLLLOCAL AssertionImpl : public virtual Assertion,
906 public AbstractComplexElement,
907 public AbstractDOMCachingXMLObject,
908 public AbstractXMLObjectMarshaller,
909 public AbstractXMLObjectUnmarshaller
916 m_children.push_back(NULL);
917 m_children.push_back(NULL);
918 m_children.push_back(NULL);
922 m_pos_Conditions=m_children.begin();
923 m_pos_Advice=m_pos_Conditions;
925 m_pos_Signature=m_pos_Advice;
929 virtual ~AssertionImpl() {
930 XMLString::release(&m_MinorVersion);
931 XMLString::release(&m_AssertionID);
932 XMLString::release(&m_Issuer);
933 delete m_IssueInstant;
936 AssertionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
937 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
941 AssertionImpl(const AssertionImpl& src)
942 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
944 setMinorVersion(src.m_MinorVersion);
945 setAssertionID(src.getAssertionID());
946 setIssuer(src.getIssuer());
947 setIssueInstant(src.getIssueInstant());
948 if (src.getConditions())
949 setConditions(src.getConditions()->cloneConditions());
951 setAdvice(src.getAdvice()->cloneAdvice());
952 if (src.getSignature())
953 setSignature(src.getSignature()->cloneSignature());
954 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
956 AuthenticationStatement* authst=dynamic_cast<AuthenticationStatement*>(*i);
958 getAuthenticationStatements().push_back(authst->cloneAuthenticationStatement());
962 AttributeStatement* attst=dynamic_cast<AttributeStatement*>(*i);
964 getAttributeStatements().push_back(attst->cloneAttributeStatement());
968 AuthorizationDecisionStatement* authzst=dynamic_cast<AuthorizationDecisionStatement*>(*i);
970 getAuthorizationDecisionStatements().push_back(authzst->cloneAuthorizationDecisionStatement());
974 SubjectStatement* subst=dynamic_cast<SubjectStatement*>(*i);
976 getSubjectStatements().push_back(subst->cloneSubjectStatement());
980 Statement* st=dynamic_cast<Statement*>(*i);
982 getStatements().push_back(st->cloneStatement());
989 //IMPL_TYPED_CHILD(Signature);
990 // Need customized setter.
992 Signature* m_Signature;
993 list<XMLObject*>::iterator m_pos_Signature;
995 Signature* getSignature() const {
999 void setSignature(Signature* sig) {
1000 prepareForAssignment(m_Signature,sig);
1001 *m_pos_Signature=m_Signature=sig;
1002 // Sync content reference back up.
1004 m_Signature->setContentReference(new opensaml::ContentReference(*this));
1007 IMPL_XMLOBJECT_CLONE(Assertion);
1008 IMPL_INTEGER_ATTRIB(MinorVersion);
1009 IMPL_STRING_ATTRIB(AssertionID); // have to special-case getXMLID
1010 const XMLCh* getXMLID() const {
1011 pair<bool,int> v = getMinorVersion();
1012 return (!v.first || v.second > 0) ? m_AssertionID : NULL;
1014 IMPL_STRING_ATTRIB(Issuer);
1015 IMPL_DATETIME_ATTRIB(IssueInstant,0);
1016 IMPL_TYPED_CHILD(Conditions);
1017 IMPL_TYPED_CHILD(Advice);
1018 IMPL_TYPED_CHILDREN(Statement, m_pos_Signature);
1019 IMPL_TYPED_CHILDREN(SubjectStatement, m_pos_Signature);
1020 IMPL_TYPED_CHILDREN(AuthenticationStatement, m_pos_Signature);
1021 IMPL_TYPED_CHILDREN(AttributeStatement, m_pos_Signature);
1022 IMPL_TYPED_CHILDREN(AuthorizationDecisionStatement, m_pos_Signature);
1025 void marshallAttributes(DOMElement* domElement) const {
1026 static const XMLCh MAJORVERSION[] = UNICODE_LITERAL_12(M,a,j,o,r,V,e,r,s,i,o,n);
1027 domElement->setAttributeNS(NULL,MAJORVERSION,XMLConstants::XML_ONE);
1028 if (!m_MinorVersion)
1029 const_cast<AssertionImpl*>(this)->m_MinorVersion=XMLString::replicate(XMLConstants::XML_ONE);
1030 MARSHALL_INTEGER_ATTRIB(MinorVersion,MINORVERSION,NULL);
1032 const_cast<AssertionImpl*>(this)->m_AssertionID=SAMLConfig::getConfig().generateIdentifier();
1033 MARSHALL_ID_ATTRIB(AssertionID,ASSERTIONID,NULL);
1034 MARSHALL_STRING_ATTRIB(Issuer,ISSUER,NULL);
1035 if (!m_IssueInstant) {
1036 const_cast<AssertionImpl*>(this)->m_IssueInstantEpoch=time(NULL);
1037 const_cast<AssertionImpl*>(this)->m_IssueInstant=new DateTime(m_IssueInstantEpoch);
1039 MARSHALL_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,NULL);
1042 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1043 PROC_TYPED_CHILD(Conditions,SAMLConstants::SAML1_NS,false);
1044 PROC_TYPED_CHILD(Advice,SAMLConstants::SAML1_NS,false);
1045 PROC_TYPED_CHILD(Signature,XMLConstants::XMLSIG_NS,false);
1046 PROC_TYPED_CHILDREN(AuthenticationStatement,SAMLConstants::SAML1_NS,false);
1047 PROC_TYPED_CHILDREN(AttributeStatement,SAMLConstants::SAML1_NS,false);
1048 PROC_TYPED_CHILDREN(AuthorizationDecisionStatement,SAMLConstants::SAML1_NS,false);
1049 PROC_TYPED_CHILDREN(SubjectStatement,SAMLConstants::SAML1_NS,true);
1050 PROC_TYPED_CHILDREN(Statement,SAMLConstants::SAML1_NS,true);
1051 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1054 void processAttribute(const DOMAttr* attribute) {
1055 static const XMLCh MAJORVERSION[] = UNICODE_LITERAL_12(M,a,j,o,r,V,e,r,s,i,o,n);
1056 if (XMLHelper::isNodeNamed(attribute,NULL,MAJORVERSION)) {
1057 if (!XMLString::equals(attribute->getValue(),XMLConstants::XML_ONE))
1058 throw UnmarshallingException("Assertion has invalid major version.");
1060 PROC_INTEGER_ATTRIB(MinorVersion,MINORVERSION,NULL);
1061 PROC_ID_ATTRIB(AssertionID,ASSERTIONID,NULL);
1062 PROC_STRING_ATTRIB(Issuer,ISSUER,NULL);
1063 PROC_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,NULL);
1070 #if defined (_MSC_VER)
1071 #pragma warning( pop )
1074 // Builder Implementations
1076 IMPL_XMLOBJECTBUILDER(Action);
1077 IMPL_XMLOBJECTBUILDER(Advice);
1078 IMPL_XMLOBJECTBUILDER(Assertion);
1079 IMPL_XMLOBJECTBUILDER(AssertionIDReference);
1080 IMPL_XMLOBJECTBUILDER(Attribute);
1081 IMPL_XMLOBJECTBUILDER(AttributeDesignator);
1082 IMPL_XMLOBJECTBUILDER(AttributeStatement);
1083 IMPL_XMLOBJECTBUILDER(AttributeValue);
1084 IMPL_XMLOBJECTBUILDER(Audience);
1085 IMPL_XMLOBJECTBUILDER(AudienceRestrictionCondition);
1086 IMPL_XMLOBJECTBUILDER(AuthenticationStatement);
1087 IMPL_XMLOBJECTBUILDER(AuthorizationDecisionStatement);
1088 IMPL_XMLOBJECTBUILDER(AuthorityBinding);
1089 IMPL_XMLOBJECTBUILDER(Conditions);
1090 IMPL_XMLOBJECTBUILDER(ConfirmationMethod);
1091 IMPL_XMLOBJECTBUILDER(DoNotCacheCondition);
1092 IMPL_XMLOBJECTBUILDER(Evidence);
1093 IMPL_XMLOBJECTBUILDER(NameIdentifier);
1094 IMPL_XMLOBJECTBUILDER(Subject);
1095 IMPL_XMLOBJECTBUILDER(SubjectConfirmation);
1096 IMPL_XMLOBJECTBUILDER(SubjectConfirmationData);
1097 IMPL_XMLOBJECTBUILDER(SubjectLocality);
1100 const XMLCh Action::LOCAL_NAME[] = UNICODE_LITERAL_6(A,c,t,i,o,n);
1101 const XMLCh Action::TYPE_NAME[] = UNICODE_LITERAL_10(A,c,t,i,o,n,T,y,p,e);
1102 const XMLCh Action::NAMESPACE_ATTRIB_NAME[] = UNICODE_LITERAL_9(N,a,m,e,s,p,a,c,e);
1103 const XMLCh Advice::LOCAL_NAME[] = UNICODE_LITERAL_6(A,d,v,i,c,e);
1104 const XMLCh Advice::TYPE_NAME[] = UNICODE_LITERAL_10(A,d,v,i,c,e,T,y,p,e);
1105 const XMLCh Assertion::LOCAL_NAME[] = UNICODE_LITERAL_9(A,s,s,e,r,t,i,o,n);
1106 const XMLCh Assertion::TYPE_NAME[] = UNICODE_LITERAL_13(A,s,s,e,r,t,i,o,n,T,y,p,e);
1107 const XMLCh Assertion::MINORVERSION_ATTRIB_NAME[] = UNICODE_LITERAL_12(M,i,n,o,r,V,e,r,s,i,o,n);
1108 const XMLCh Assertion::ASSERTIONID_ATTRIB_NAME[] = UNICODE_LITERAL_11(A,s,s,e,r,t,i,o,n,I,D);
1109 const XMLCh Assertion::ISSUER_ATTRIB_NAME[] = UNICODE_LITERAL_6(I,s,s,u,e,r);
1110 const XMLCh Assertion::ISSUEINSTANT_ATTRIB_NAME[] = UNICODE_LITERAL_12(I,s,s,u,e,I,n,s,t,a,n,t);
1111 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);
1112 const XMLCh Attribute::LOCAL_NAME[] = UNICODE_LITERAL_9(A,t,t,r,i,b,u,t,e);
1113 const XMLCh Attribute::TYPE_NAME[] = UNICODE_LITERAL_13(A,t,t,r,i,b,u,t,e,T,y,p,e);
1114 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);
1115 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);
1116 const XMLCh AttributeDesignator::ATTRIBUTENAME_ATTRIB_NAME[] = UNICODE_LITERAL_13(A,t,t,r,i,b,u,t,e,N,a,m,e);
1117 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);
1118 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);
1119 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);
1120 const XMLCh AttributeValue::LOCAL_NAME[] = UNICODE_LITERAL_14(A,t,t,r,i,b,u,t,e,V,a,l,u,e);
1121 const XMLCh Audience::LOCAL_NAME[] = UNICODE_LITERAL_8(A,u,d,i,e,n,c,e);
1122 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);
1123 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);
1124 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);
1125 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);
1126 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);
1127 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);
1128 const XMLCh AuthorityBinding::LOCAL_NAME[] = UNICODE_LITERAL_16(A,u,t,h,o,r,i,t,y,B,i,n,d,i,n,g);
1129 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);
1130 const XMLCh AuthorityBinding::AUTHORITYKIND_ATTRIB_NAME[] = UNICODE_LITERAL_13(A,u,t,h,o,r,i,t,y,K,i,n,d);
1131 const XMLCh AuthorityBinding::LOCATION_ATTRIB_NAME[] = UNICODE_LITERAL_8(L,o,c,a,t,i,o,n);
1132 const XMLCh AuthorityBinding::BINDING_ATTRIB_NAME[] = UNICODE_LITERAL_7(B,i,n,d,i,n,g);
1133 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);
1134 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);
1135 const XMLCh AuthorizationDecisionStatement::RESOURCE_ATTRIB_NAME[] = UNICODE_LITERAL_8(R,e,s,o,u,r,c,e);
1136 const XMLCh AuthorizationDecisionStatement::DECISION_ATTRIB_NAME[] = UNICODE_LITERAL_8(D,e,c,i,s,i,o,n);
1137 const XMLCh AuthorizationDecisionStatement::DECISION_PERMIT[] = UNICODE_LITERAL_6(P,e,r,m,i,t);
1138 const XMLCh AuthorizationDecisionStatement::DECISION_DENY[] = UNICODE_LITERAL_4(D,e,n,y);
1139 const XMLCh AuthorizationDecisionStatement::DECISION_INDETERMINATE[] = UNICODE_LITERAL_13(I,n,d,e,t,e,r,m,i,n,a,t,e);
1140 const XMLCh Condition::LOCAL_NAME[] = UNICODE_LITERAL_9(C,o,n,d,i,t,i,o,n);
1141 const XMLCh Conditions::LOCAL_NAME[] = UNICODE_LITERAL_10(C,o,n,d,i,t,i,o,n,s);
1142 const XMLCh Conditions::TYPE_NAME[] = UNICODE_LITERAL_14(C,o,n,d,i,t,i,o,n,s,T,y,p,e);
1143 const XMLCh Conditions::NOTBEFORE_ATTRIB_NAME[] = UNICODE_LITERAL_9(N,o,t,B,e,f,o,r,e);
1144 const XMLCh Conditions::NOTONORAFTER_ATTRIB_NAME[] =UNICODE_LITERAL_12(N,o,t,O,n,O,r,A,f,t,e,r);
1145 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);
1146 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);
1147 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);
1148 const XMLCh Evidence::LOCAL_NAME[] = UNICODE_LITERAL_8(E,v,i,d,e,n,c,e);
1149 const XMLCh Evidence::TYPE_NAME[] = UNICODE_LITERAL_12(E,v,i,d,e,n,c,e,T,y,p,e);
1150 const XMLCh NameIdentifier::LOCAL_NAME[] = UNICODE_LITERAL_14(N,a,m,e,I,d,e,n,t,i,f,i,e,r);
1151 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);
1152 const XMLCh NameIdentifier::NAMEQUALIFIER_ATTRIB_NAME[] = UNICODE_LITERAL_13(N,a,m,e,Q,u,a,l,i,f,i,e,r);
1153 const XMLCh NameIdentifier::FORMAT_ATTRIB_NAME[] = UNICODE_LITERAL_6(F,o,r,m,a,t);
1154 const XMLCh Statement::LOCAL_NAME[] = UNICODE_LITERAL_9(S,t,a,t,e,m,e,n,t);
1155 const XMLCh Subject::LOCAL_NAME[] = UNICODE_LITERAL_7(S,u,b,j,e,c,t);
1156 const XMLCh Subject::TYPE_NAME[] = UNICODE_LITERAL_11(S,u,b,j,e,c,t,T,y,p,e);
1157 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);
1158 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);
1159 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);
1160 const XMLCh SubjectLocality::LOCAL_NAME[] = UNICODE_LITERAL_15(S,u,b,j,e,c,t,L,o,c,a,l,i,t,y);
1161 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);
1162 const XMLCh SubjectLocality::IPADDRESS_ATTRIB_NAME[] = UNICODE_LITERAL_9(I,P,A,d,d,r,e,s,s);
1163 const XMLCh SubjectLocality::DNSADDRESS_ATTRIB_NAME[] = UNICODE_LITERAL_10(D,N,S,A,d,d,r,e,s,s);
1164 const XMLCh SubjectStatement::LOCAL_NAME[] = UNICODE_LITERAL_16(S,u,b,j,e,c,t,S,t,a,t,e,m,e,n,t);
1166 const XMLCh NameIdentifier::UNSPECIFIED[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified
1167 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1168 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1169 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1170 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1171 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1172 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
1175 const XMLCh NameIdentifier::EMAIL[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress
1176 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1177 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1178 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1179 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1180 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1181 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
1184 const XMLCh NameIdentifier::X509_SUBJECT[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName
1185 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1186 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1187 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1188 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1189 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1190 chLatin_X, chDigit_5, chDigit_0, chDigit_9, chLatin_S, chLatin_u, chLatin_b, chLatin_j, chLatin_e, chLatin_c, chLatin_t,
1191 chLatin_N, chLatin_a, chLatin_m, chLatin_e, chNull
1194 const XMLCh NameIdentifier::WIN_DOMAIN_QUALIFIED[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName
1195 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1196 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1197 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1198 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1199 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1200 chLatin_W, chLatin_i, chLatin_n, chLatin_d, chLatin_o, chLatin_w, chLatin_s,
1201 chLatin_D, chLatin_o, chLatin_m, chLatin_a, chLatin_i, chLatin_n,
1202 chLatin_Q, chLatin_u, chLatin_a, chLatin_l, chLatin_i, chLatin_f, chLatin_i, chLatin_e, chLatin_d,
1203 chLatin_N, chLatin_a, chLatin_m, chLatin_e, chNull
1206 const XMLCh SubjectConfirmation::ARTIFACT01[] = // urn:oasis:names:tc:SAML:1.0:cm:artifact-01
1207 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1208 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1209 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1210 chLatin_c, chLatin_m, chColon, chLatin_a, chLatin_r, chLatin_t, chLatin_i, chLatin_f, chLatin_a, chLatin_c, chLatin_t,
1211 chDash, chDigit_0, chDigit_1, chNull
1214 const XMLCh SubjectConfirmation::ARTIFACT[] = // urn:oasis:names:tc:SAML:1.0:cm:artifact
1215 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1216 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1217 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1218 chLatin_c, chLatin_m, chColon, chLatin_a, chLatin_r, chLatin_t, chLatin_i, chLatin_f, chLatin_a, chLatin_c, chLatin_t, chNull
1221 const XMLCh SubjectConfirmation::BEARER[] = // urn:oasis:names:tc:SAML:1.0:cm:bearer
1222 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1223 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1224 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1225 chLatin_c, chLatin_m, chColon, chLatin_b, chLatin_e, chLatin_a, chLatin_r, chLatin_e, chLatin_r, chNull
1228 const XMLCh SubjectConfirmation::HOLDER_KEY[] = // urn:oasis:names:tc:SAML:1.0:cm:holder-of-key
1229 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1230 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1231 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1232 chLatin_c, chLatin_m, chColon, chLatin_h, chLatin_o, chLatin_l, chLatin_d, chLatin_e, chLatin_r, chDash,
1233 chLatin_o, chLatin_f, chDash, chLatin_k, chLatin_e, chLatin_y, chNull
1236 const XMLCh SubjectConfirmation::SENDER_VOUCHES[] = // urn:oasis:names:tc:SAML:1.0:cm:sender-vouches
1237 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1238 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1239 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1240 chLatin_c, chLatin_m, chColon, chLatin_s, chLatin_e, chLatin_n, chLatin_d, chLatin_e, chLatin_r, chDash,
1241 chLatin_v, chLatin_o, chLatin_u, chLatin_c, chLatin_h, chLatin_e, chLatin_s, chNull
1244 const XMLCh Action::RWEDC_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:rwedc
1245 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1246 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1247 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1248 chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1249 chLatin_r, chLatin_w, chLatin_e, chLatin_d, chLatin_c, chNull
1252 const XMLCh Action::RWEDC_NEG_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:rwedc-negation
1253 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1254 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1255 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1256 chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1257 chLatin_r, chLatin_w, chLatin_e, chLatin_d, chLatin_c, chDash,
1258 chLatin_n, chLatin_e, chLatin_g, chLatin_a, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chNull
1261 const XMLCh Action::GHPP_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:ghpp
1262 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1263 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1264 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1265 chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1266 chLatin_g, chLatin_h, chLatin_p, chLatin_p, chNull
1269 const XMLCh Action::UNIX_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:unix
1270 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1271 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1272 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1273 chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1274 chLatin_u, chLatin_n, chLatin_i, chLatin_x, chNull