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/AbstractChildlessElement.h>
28 #include <xmltooling/AbstractComplexElement.h>
29 #include <xmltooling/AbstractElementProxy.h>
30 #include <xmltooling/AbstractSimpleElement.h>
31 #include <xmltooling/impl/AnyElement.h>
32 #include <xmltooling/io/AbstractXMLObjectMarshaller.h>
33 #include <xmltooling/io/AbstractXMLObjectUnmarshaller.h>
34 #include <xmltooling/util/XMLHelper.h>
38 #include <xercesc/util/XMLUniDefs.hpp>
40 using namespace opensaml::saml1;
41 using namespace opensaml;
42 using namespace xmlsignature;
43 using namespace xmltooling;
46 #if defined (_MSC_VER)
47 #pragma warning( push )
48 #pragma warning( disable : 4250 4251 )
54 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AssertionIDReference);
55 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,Audience);
56 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,ConfirmationMethod);
58 class SAML_DLLLOCAL AudienceRestrictionConditionImpl : public virtual AudienceRestrictionCondition,
59 public AbstractComplexElement,
60 public AbstractDOMCachingXMLObject,
61 public AbstractXMLObjectMarshaller,
62 public AbstractXMLObjectUnmarshaller
65 virtual ~AudienceRestrictionConditionImpl() {}
67 AudienceRestrictionConditionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
68 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
71 AudienceRestrictionConditionImpl(const AudienceRestrictionConditionImpl& src)
72 : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) {
73 VectorOf(Audience) v=getAudiences();
74 for (vector<Audience*>::const_iterator i=src.m_Audiences.begin(); i!=src.m_Audiences.end(); i++) {
76 v.push_back((*i)->cloneAudience());
81 IMPL_XMLOBJECT_CLONE(AudienceRestrictionCondition);
82 Condition* cloneCondition() const {
83 return cloneAudienceRestrictionCondition();
85 IMPL_TYPED_CHILDREN(Audience,m_children.end());
88 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
89 PROC_TYPED_CHILDREN(Audience,SAMLConstants::SAML1_NS,false);
90 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
94 class SAML_DLLLOCAL DoNotCacheConditionImpl : public virtual DoNotCacheCondition,
95 public AbstractChildlessElement,
96 public AbstractDOMCachingXMLObject,
97 public AbstractXMLObjectMarshaller,
98 public AbstractXMLObjectUnmarshaller
101 virtual ~DoNotCacheConditionImpl() {}
103 DoNotCacheConditionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
104 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
107 DoNotCacheConditionImpl(const DoNotCacheConditionImpl& src) : AbstractXMLObject(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) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) {
135 setNotBefore(src.getNotBefore());
136 setNotOnOrAfter(src.getNotOnOrAfter());
138 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
140 AudienceRestrictionCondition* arc=dynamic_cast<AudienceRestrictionCondition*>(*i);
142 getAudienceRestrictionConditions().push_back(arc->cloneAudienceRestrictionCondition());
146 DoNotCacheCondition* dncc=dynamic_cast<DoNotCacheCondition*>(*i);
148 getDoNotCacheConditions().push_back(dncc->cloneDoNotCacheCondition());
152 Condition* c=dynamic_cast<Condition*>(*i);
154 getConditions().push_back(c->cloneCondition());
162 m_NotBefore=m_NotOnOrAfter=NULL;
165 IMPL_XMLOBJECT_CLONE(Conditions);
166 IMPL_DATETIME_ATTRIB(NotBefore,0);
167 IMPL_DATETIME_ATTRIB(NotOnOrAfter,SAMLTIME_MAX);
168 IMPL_TYPED_CHILDREN(AudienceRestrictionCondition, m_children.end());
169 IMPL_TYPED_CHILDREN(DoNotCacheCondition,m_children.end());
170 IMPL_TYPED_CHILDREN(Condition,m_children.end());
173 void marshallAttributes(DOMElement* domElement) const {
174 MARSHALL_DATETIME_ATTRIB(NotBefore,NOTBEFORE,NULL);
175 MARSHALL_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,NULL);
178 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
179 PROC_TYPED_CHILDREN(AudienceRestrictionCondition,SAMLConstants::SAML1_NS,true);
180 PROC_TYPED_CHILDREN(DoNotCacheCondition,SAMLConstants::SAML1_NS,true);
181 PROC_TYPED_CHILDREN(Condition,SAMLConstants::SAML1_NS,true);
182 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
185 void processAttribute(const DOMAttr* attribute) {
186 PROC_DATETIME_ATTRIB(NotBefore,NOTBEFORE,NULL);
187 PROC_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,NULL);
191 class SAML_DLLLOCAL NameIdentifierImpl : public virtual NameIdentifier,
192 public AbstractSimpleElement,
193 public AbstractChildlessElement,
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);
223 IMPL_XMLOBJECT_CONTENT;
226 void marshallAttributes(DOMElement* domElement) const {
227 MARSHALL_STRING_ATTRIB(Format,FORMAT,NULL);
228 MARSHALL_STRING_ATTRIB(NameQualifier,NAMEQUALIFIER,NULL);
231 void processAttribute(const DOMAttr* attribute) {
232 PROC_STRING_ATTRIB(Format,FORMAT,NULL);
233 PROC_STRING_ATTRIB(NameQualifier,NAMEQUALIFIER,NULL);
237 class SAML_DLLLOCAL SubjectConfirmationDataImpl : public virtual SubjectConfirmationData, public AnyElementImpl
240 virtual ~SubjectConfirmationDataImpl() {}
242 SubjectConfirmationDataImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
243 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
246 SubjectConfirmationDataImpl(const SubjectConfirmationDataImpl& src)
247 : AnyElementImpl(src) {
250 IMPL_XMLOBJECT_CLONE(SubjectConfirmationData);
253 class SAML_DLLLOCAL SubjectConfirmationImpl : public virtual SubjectConfirmation,
254 public AbstractComplexElement,
255 public AbstractDOMCachingXMLObject,
256 public AbstractXMLObjectMarshaller,
257 public AbstractXMLObjectUnmarshaller
260 virtual ~SubjectConfirmationImpl() {}
262 SubjectConfirmationImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
263 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
267 SubjectConfirmationImpl(const SubjectConfirmationImpl& src) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) {
269 if (src.getSubjectConfirmationData())
270 setSubjectConfirmationData(src.getSubjectConfirmationData()->clone());
271 if (src.getKeyInfo())
272 setKeyInfo(src.getKeyInfo()->cloneKeyInfo());
273 VectorOf(ConfirmationMethod) v=getConfirmationMethods();
274 for (vector<ConfirmationMethod*>::const_iterator i=src.m_ConfirmationMethods.begin(); i!=src.m_ConfirmationMethods.end(); i++) {
276 v.push_back((*i)->cloneConfirmationMethod());
282 m_SubjectConfirmationData=NULL;
284 m_children.push_back(NULL);
285 m_children.push_back(NULL);
286 m_pos_SubjectConfirmationData=m_children.begin();
287 m_pos_KeyInfo=m_pos_SubjectConfirmationData;
291 IMPL_XMLOBJECT_CLONE(SubjectConfirmation);
292 IMPL_TYPED_CHILDREN(ConfirmationMethod,m_pos_SubjectConfirmationData);
293 IMPL_XMLOBJECT_CHILD(SubjectConfirmationData);
294 IMPL_TYPED_CHILD(KeyInfo);
297 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
298 PROC_TYPED_CHILDREN(ConfirmationMethod,SAMLConstants::SAML1_NS,false);
299 PROC_TYPED_CHILD(KeyInfo,XMLConstants::XMLSIG_NS,false);
301 // Anything else we'll assume is the data.
302 if (getSubjectConfirmationData())
303 throw UnmarshallingException("Invalid child element: $1",params(1,childXMLObject->getElementQName().toString().c_str()));
304 setSubjectConfirmationData(childXMLObject);
308 class SAML_DLLLOCAL SubjectImpl : public virtual Subject,
309 public AbstractComplexElement,
310 public AbstractDOMCachingXMLObject,
311 public AbstractXMLObjectMarshaller,
312 public AbstractXMLObjectUnmarshaller
315 virtual ~SubjectImpl() {}
317 SubjectImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
318 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
322 SubjectImpl(const SubjectImpl& src) : AbstractXMLObject(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) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) {
377 if (src.getSubject())
378 setSubject(src.getSubject()->cloneSubject());
381 IMPL_TYPED_CHILD(Subject);
384 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
385 PROC_TYPED_CHILD(Subject,SAMLConstants::SAML1_NS,true);
386 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
390 class SAML_DLLLOCAL SubjectLocalityImpl : public virtual SubjectLocality,
391 public AbstractChildlessElement,
392 public AbstractDOMCachingXMLObject,
393 public AbstractXMLObjectMarshaller,
394 public AbstractXMLObjectUnmarshaller
397 virtual ~SubjectLocalityImpl() {
398 XMLString::release(&m_IPAddress);
399 XMLString::release(&m_DNSAddress);
402 SubjectLocalityImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
403 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
407 SubjectLocalityImpl(const SubjectLocalityImpl& src) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) {
409 setIPAddress(src.getIPAddress());
410 setDNSAddress(src.getDNSAddress());
414 m_IPAddress=m_DNSAddress=NULL;
417 IMPL_XMLOBJECT_CLONE(SubjectLocality);
418 IMPL_STRING_ATTRIB(IPAddress);
419 IMPL_STRING_ATTRIB(DNSAddress);
422 void marshallAttributes(DOMElement* domElement) const {
423 MARSHALL_STRING_ATTRIB(IPAddress,IPADDRESS,NULL);
424 MARSHALL_STRING_ATTRIB(DNSAddress,DNSADDRESS,NULL);
427 void processAttribute(const DOMAttr* attribute) {
428 PROC_STRING_ATTRIB(IPAddress,IPADDRESS,NULL);
429 PROC_STRING_ATTRIB(DNSAddress,DNSADDRESS,NULL);
433 class SAML_DLLLOCAL AuthorityBindingImpl : public virtual AuthorityBinding,
434 public AbstractChildlessElement,
435 public AbstractDOMCachingXMLObject,
436 public AbstractXMLObjectMarshaller,
437 public AbstractXMLObjectUnmarshaller
440 virtual ~AuthorityBindingImpl() {
441 delete m_AuthorityKind;
442 XMLString::release(&m_Location);
443 XMLString::release(&m_Binding);
446 AuthorityBindingImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
447 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
451 AuthorityBindingImpl(const AuthorityBindingImpl& src) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) {
453 setAuthorityKind(src.getAuthorityKind());
454 setLocation(src.getLocation());
455 setBinding(src.getBinding());
459 m_AuthorityKind=NULL;
460 m_Location=m_Binding=NULL;
463 IMPL_XMLOBJECT_CLONE(AuthorityBinding);
464 IMPL_XMLOBJECT_ATTRIB(AuthorityKind,QName);
465 IMPL_STRING_ATTRIB(Location);
466 IMPL_STRING_ATTRIB(Binding);
469 void marshallAttributes(DOMElement* domElement) const {
470 MARSHALL_QNAME_ATTRIB(AuthorityKind,AUTHORITYKIND,NULL);
471 MARSHALL_STRING_ATTRIB(Location,LOCATION,NULL);
472 MARSHALL_STRING_ATTRIB(Binding,BINDING,NULL);
475 void processAttribute(const DOMAttr* attribute) {
476 PROC_QNAME_ATTRIB(AuthorityKind,AUTHORITYKIND,NULL);
477 PROC_STRING_ATTRIB(Location,LOCATION,NULL);
478 PROC_STRING_ATTRIB(Binding,BINDING,NULL);
482 class SAML_DLLLOCAL AuthenticationStatementImpl : public virtual AuthenticationStatement, public SubjectStatementImpl
485 virtual ~AuthenticationStatementImpl() {
486 XMLString::release(&m_AuthenticationMethod);
487 delete m_AuthenticationInstant;
490 AuthenticationStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
491 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
495 AuthenticationStatementImpl(const AuthenticationStatementImpl& src) : AbstractXMLObject(src), SubjectStatementImpl(src) {
497 setAuthenticationMethod(src.getAuthenticationMethod());
498 setAuthenticationInstant(src.getAuthenticationInstant());
499 if (src.getSubjectLocality())
500 setSubjectLocality(src.getSubjectLocality()->cloneSubjectLocality());
501 VectorOf(AuthorityBinding) v=getAuthorityBindings();
502 for (vector<AuthorityBinding*>::const_iterator i=src.m_AuthorityBindings.begin(); i!=src.m_AuthorityBindings.end(); i++) {
504 v.push_back((*i)->cloneAuthorityBinding());
510 m_AuthenticationMethod=NULL;
511 m_AuthenticationInstant=NULL;
512 m_SubjectLocality=NULL;
513 m_children.push_back(NULL);
514 m_pos_SubjectLocality=m_pos_Subject;
515 ++m_pos_SubjectLocality;
518 IMPL_XMLOBJECT_CLONE(AuthenticationStatement);
519 SubjectStatement* cloneSubjectStatement() const {
520 return cloneAuthenticationStatement();
522 Statement* cloneStatement() const {
523 return cloneAuthenticationStatement();
525 IMPL_STRING_ATTRIB(AuthenticationMethod);
526 IMPL_DATETIME_ATTRIB(AuthenticationInstant,0);
527 IMPL_TYPED_CHILD(SubjectLocality);
528 IMPL_TYPED_CHILDREN(AuthorityBinding, m_children.end());
531 void marshallAttributes(DOMElement* domElement) const {
532 MARSHALL_STRING_ATTRIB(AuthenticationMethod,AUTHENTICATIONMETHOD,NULL);
533 MARSHALL_DATETIME_ATTRIB(AuthenticationInstant,AUTHENTICATIONINSTANT,NULL);
534 SubjectStatementImpl::marshallAttributes(domElement);
537 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
538 PROC_TYPED_CHILD(SubjectLocality,SAMLConstants::SAML1_NS,false);
539 PROC_TYPED_CHILDREN(AuthorityBinding,SAMLConstants::SAML1_NS,false);
540 SubjectStatementImpl::processChildElement(childXMLObject,root);
543 void processAttribute(const DOMAttr* attribute) {
544 PROC_STRING_ATTRIB(AuthenticationMethod,AUTHENTICATIONMETHOD,NULL);
545 PROC_DATETIME_ATTRIB(AuthenticationInstant,AUTHENTICATIONINSTANT,NULL);
546 SubjectStatementImpl::processAttribute(attribute);
550 class SAML_DLLLOCAL ActionImpl : public virtual Action,
551 public AbstractSimpleElement,
552 public AbstractChildlessElement,
553 public AbstractDOMCachingXMLObject,
554 public AbstractXMLObjectMarshaller,
555 public AbstractXMLObjectUnmarshaller
558 virtual ~ActionImpl() {
559 XMLString::release(&m_Namespace);
562 ActionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
563 : AbstractXMLObject(nsURI, localName, prefix, schemaType), m_Namespace(NULL) {
566 ActionImpl(const ActionImpl& src) : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
567 setNamespace(src.getNamespace());
570 IMPL_XMLOBJECT_CLONE(Action);
571 IMPL_STRING_ATTRIB(Namespace);
572 IMPL_XMLOBJECT_CONTENT;
575 void marshallAttributes(DOMElement* domElement) const {
576 MARSHALL_STRING_ATTRIB(Namespace,NAMESPACE,NULL);
579 void processAttribute(const DOMAttr* attribute) {
580 PROC_STRING_ATTRIB(Namespace,NAMESPACE,NULL);
584 class SAML_DLLLOCAL EvidenceImpl : public virtual Evidence,
585 public AbstractComplexElement,
586 public AbstractDOMCachingXMLObject,
587 public AbstractXMLObjectMarshaller,
588 public AbstractXMLObjectUnmarshaller
591 virtual ~EvidenceImpl() {}
593 EvidenceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
594 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
597 EvidenceImpl(const EvidenceImpl& src) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) {
599 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
601 AssertionIDReference* ref=dynamic_cast<AssertionIDReference*>(*i);
603 getAssertionIDReferences().push_back(ref->cloneAssertionIDReference());
607 Assertion* assertion=dynamic_cast<Assertion*>(*i);
609 getAssertions().push_back(assertion->cloneAssertion());
616 IMPL_XMLOBJECT_CLONE(Evidence);
617 IMPL_TYPED_CHILDREN(AssertionIDReference,m_children.end());
618 IMPL_TYPED_CHILDREN(Assertion,m_children.end());
621 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
622 PROC_TYPED_CHILDREN(AssertionIDReference,SAMLConstants::SAML1_NS,false);
623 PROC_TYPED_CHILDREN(Assertion,SAMLConstants::SAML1_NS,true);
624 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
628 class SAML_DLLLOCAL AuthorizationDecisionStatementImpl
629 : public virtual AuthorizationDecisionStatement, public SubjectStatementImpl
632 virtual ~AuthorizationDecisionStatementImpl() {
633 XMLString::release(&m_Resource);
634 XMLString::release(&m_Decision);
637 AuthorizationDecisionStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
638 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
642 AuthorizationDecisionStatementImpl(const AuthorizationDecisionStatementImpl& src)
643 : AbstractXMLObject(src), SubjectStatementImpl(src) {
645 setResource(src.getResource());
646 setDecision(src.getDecision());
647 if (src.getEvidence())
648 setEvidence(src.getEvidence()->cloneEvidence());
649 VectorOf(Action) v=getActions();
650 for (vector<Action*>::const_iterator i=src.m_Actions.begin(); i!=src.m_Actions.end(); i++) {
652 v.push_back((*i)->cloneAction());
661 m_children.push_back(NULL);
662 m_pos_Evidence=m_pos_Subject;
666 IMPL_XMLOBJECT_CLONE(AuthorizationDecisionStatement);
667 SubjectStatement* cloneSubjectStatement() const {
668 return cloneAuthorizationDecisionStatement();
670 Statement* cloneStatement() const {
671 return cloneAuthorizationDecisionStatement();
673 IMPL_STRING_ATTRIB(Resource);
674 IMPL_STRING_ATTRIB(Decision);
675 IMPL_TYPED_CHILD(Evidence);
676 IMPL_TYPED_CHILDREN(Action, m_pos_Evidence);
679 void marshallAttributes(DOMElement* domElement) const {
680 MARSHALL_STRING_ATTRIB(Resource,RESOURCE,NULL);
681 MARSHALL_STRING_ATTRIB(Decision,DECISION,NULL);
682 SubjectStatementImpl::marshallAttributes(domElement);
685 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
686 PROC_TYPED_CHILD(Evidence,SAMLConstants::SAML1_NS,false);
687 PROC_TYPED_CHILDREN(Action,SAMLConstants::SAML1_NS,false);
688 SubjectStatementImpl::processChildElement(childXMLObject,root);
691 void processAttribute(const DOMAttr* attribute) {
692 PROC_STRING_ATTRIB(Resource,RESOURCE,NULL);
693 PROC_STRING_ATTRIB(Decision,DECISION,NULL);
694 SubjectStatementImpl::processAttribute(attribute);
698 class SAML_DLLLOCAL AttributeDesignatorImpl : public virtual AttributeDesignator,
699 public AbstractChildlessElement,
700 public AbstractDOMCachingXMLObject,
701 public AbstractXMLObjectMarshaller,
702 public AbstractXMLObjectUnmarshaller
705 virtual ~AttributeDesignatorImpl() {
706 XMLString::release(&m_AttributeName);
707 XMLString::release(&m_AttributeNamespace);
710 AttributeDesignatorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
711 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
715 AttributeDesignatorImpl(const AttributeDesignatorImpl& src) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) {
717 setAttributeName(src.getAttributeName());
718 setAttributeNamespace(src.getAttributeNamespace());
722 m_AttributeName=m_AttributeNamespace=NULL;
725 IMPL_XMLOBJECT_CLONE(AttributeDesignator);
726 IMPL_STRING_ATTRIB(AttributeName);
727 IMPL_STRING_ATTRIB(AttributeNamespace);
730 void marshallAttributes(DOMElement* domElement) const {
731 MARSHALL_STRING_ATTRIB(AttributeName,ATTRIBUTENAME,NULL);
732 MARSHALL_STRING_ATTRIB(AttributeNamespace,ATTRIBUTENAMESPACE,NULL);
735 void processAttribute(const DOMAttr* attribute) {
736 PROC_STRING_ATTRIB(AttributeName,ATTRIBUTENAME,NULL);
737 PROC_STRING_ATTRIB(AttributeNamespace,ATTRIBUTENAMESPACE,NULL);
741 class SAML_DLLLOCAL AttributeImpl : public virtual Attribute,
742 public AbstractComplexElement,
743 public AbstractDOMCachingXMLObject,
744 public AbstractXMLObjectMarshaller,
745 public AbstractXMLObjectUnmarshaller
748 virtual ~AttributeImpl() {
749 XMLString::release(&m_AttributeName);
750 XMLString::release(&m_AttributeNamespace);
753 AttributeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
754 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
758 AttributeImpl(const AttributeImpl& src) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) {
760 setAttributeName(src.getAttributeName());
761 setAttributeNamespace(src.getAttributeNamespace());
762 VectorOf(XMLObject) v=getAttributeValues();
763 for (vector<XMLObject*>::const_iterator i=src.m_AttributeValues.begin(); i!=src.m_AttributeValues.end(); i++) {
765 v.push_back((*i)->clone());
771 m_AttributeName=m_AttributeNamespace=NULL;
774 IMPL_XMLOBJECT_CLONE(Attribute);
775 AttributeDesignator* cloneAttributeDesignator() const {
776 return cloneAttribute();
778 IMPL_STRING_ATTRIB(AttributeName);
779 IMPL_STRING_ATTRIB(AttributeNamespace);
780 IMPL_XMLOBJECT_CHILDREN(AttributeValue,m_children.end());
783 void marshallAttributes(DOMElement* domElement) const {
784 MARSHALL_STRING_ATTRIB(AttributeName,ATTRIBUTENAME,NULL);
785 MARSHALL_STRING_ATTRIB(AttributeNamespace,ATTRIBUTENAMESPACE,NULL);
788 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
789 getAttributeValues().push_back(childXMLObject);
792 void processAttribute(const DOMAttr* attribute) {
793 PROC_STRING_ATTRIB(AttributeName,ATTRIBUTENAME,NULL);
794 PROC_STRING_ATTRIB(AttributeNamespace,ATTRIBUTENAMESPACE,NULL);
798 class SAML_DLLLOCAL AttributeValueImpl : public virtual AttributeValue, public AnyElementImpl
801 virtual ~AttributeValueImpl() {}
803 AttributeValueImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
804 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
807 AttributeValueImpl(const AttributeValueImpl& src) : AnyElementImpl(src) {}
809 IMPL_XMLOBJECT_CLONE(AttributeValue);
812 class SAML_DLLLOCAL AttributeStatementImpl : public virtual AttributeStatement, public SubjectStatementImpl
815 virtual ~AttributeStatementImpl() {}
817 AttributeStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
818 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
821 AttributeStatementImpl(const AttributeStatementImpl& src)
822 : AbstractXMLObject(src), SubjectStatementImpl(src) {
823 VectorOf(Attribute) v=getAttributes();
824 for (vector<Attribute*>::const_iterator i=src.m_Attributes.begin(); i!=src.m_Attributes.end(); i++) {
826 v.push_back((*i)->cloneAttribute());
831 IMPL_XMLOBJECT_CLONE(AttributeStatement);
832 SubjectStatement* cloneSubjectStatement() const {
833 return cloneAttributeStatement();
835 Statement* cloneStatement() const {
836 return cloneAttributeStatement();
838 IMPL_TYPED_CHILDREN(Attribute, m_children.end());
841 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
842 PROC_TYPED_CHILDREN(Attribute,SAMLConstants::SAML1_NS,true);
843 SubjectStatementImpl::processChildElement(childXMLObject,root);
847 class SAML_DLLLOCAL AdviceImpl : public virtual Advice,
848 public AbstractComplexElement,
849 public AbstractDOMCachingXMLObject,
850 public AbstractXMLObjectMarshaller,
851 public AbstractXMLObjectUnmarshaller
854 virtual ~AdviceImpl() {}
856 AdviceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
857 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
860 AdviceImpl(const AdviceImpl& src) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) {
862 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
864 AssertionIDReference* ref=dynamic_cast<AssertionIDReference*>(*i);
866 getAssertionIDReferences().push_back(ref->cloneAssertionIDReference());
870 Assertion* assertion=dynamic_cast<Assertion*>(*i);
872 getAssertions().push_back(assertion->cloneAssertion());
876 getOthers().push_back((*i)->clone());
881 IMPL_XMLOBJECT_CLONE(Advice);
882 IMPL_TYPED_CHILDREN(AssertionIDReference,m_children.end());
883 IMPL_TYPED_CHILDREN(Assertion,m_children.end());
884 IMPL_XMLOBJECT_CHILDREN(Other,m_children.end());
887 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
888 PROC_TYPED_CHILDREN(AssertionIDReference,SAMLConstants::SAML1_NS,false);
889 PROC_TYPED_CHILDREN(Assertion,SAMLConstants::SAML1_NS,true);
892 const XMLCh* nsURI=root->getNamespaceURI();
893 if (!XMLString::equals(nsURI,SAMLConstants::SAML1_NS) && nsURI && *nsURI) {
894 getOthers().push_back(childXMLObject);
898 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
902 class SAML_DLLLOCAL AssertionImpl : public virtual Assertion,
903 public AbstractComplexElement,
904 public AbstractDOMCachingXMLObject,
905 public AbstractXMLObjectMarshaller,
906 public AbstractXMLObjectUnmarshaller
913 m_children.push_back(NULL);
914 m_children.push_back(NULL);
915 m_children.push_back(NULL);
919 m_pos_Conditions=m_children.begin();
920 m_pos_Advice=m_pos_Conditions;
922 m_pos_Signature=m_pos_Advice;
926 virtual ~AssertionImpl() {
927 XMLString::release(&m_MinorVersion);
928 XMLString::release(&m_AssertionID);
929 XMLString::release(&m_Issuer);
930 delete m_IssueInstant;
933 AssertionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
934 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
938 AssertionImpl(const AssertionImpl& src) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) {
940 setMinorVersion(src.m_MinorVersion);
941 setAssertionID(src.getAssertionID());
942 setIssuer(src.getIssuer());
943 setIssueInstant(src.getIssueInstant());
944 if (src.getConditions())
945 setConditions(src.getConditions()->cloneConditions());
947 setAdvice(src.getAdvice()->cloneAdvice());
948 if (src.getSignature())
949 setSignature(src.getSignature()->cloneSignature());
950 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
952 AuthenticationStatement* authst=dynamic_cast<AuthenticationStatement*>(*i);
954 getAuthenticationStatements().push_back(authst->cloneAuthenticationStatement());
958 AttributeStatement* attst=dynamic_cast<AttributeStatement*>(*i);
960 getAttributeStatements().push_back(attst->cloneAttributeStatement());
964 AuthorizationDecisionStatement* authzst=dynamic_cast<AuthorizationDecisionStatement*>(*i);
966 getAuthorizationDecisionStatements().push_back(authzst->cloneAuthorizationDecisionStatement());
970 SubjectStatement* subst=dynamic_cast<SubjectStatement*>(*i);
972 getSubjectStatements().push_back(subst->cloneSubjectStatement());
976 Statement* st=dynamic_cast<Statement*>(*i);
978 getStatements().push_back(st->cloneStatement());
985 //IMPL_TYPED_CHILD(Signature);
986 // Need customized setter.
988 Signature* m_Signature;
989 list<XMLObject*>::iterator m_pos_Signature;
991 Signature* getSignature() const {
995 void setSignature(Signature* sig) {
996 prepareForAssignment(m_Signature,sig);
997 *m_pos_Signature=m_Signature=sig;
998 // Sync content reference back up.
1000 m_Signature->setContentReference(new opensaml::ContentReference(*this));
1003 IMPL_XMLOBJECT_CLONE(Assertion);
1004 IMPL_INTEGER_ATTRIB(MinorVersion);
1005 IMPL_ID_ATTRIB(AssertionID);
1006 IMPL_STRING_ATTRIB(Issuer);
1007 IMPL_DATETIME_ATTRIB(IssueInstant,0);
1008 IMPL_TYPED_CHILD(Conditions);
1009 IMPL_TYPED_CHILD(Advice);
1010 IMPL_TYPED_CHILDREN(Statement, m_pos_Signature);
1011 IMPL_TYPED_CHILDREN(SubjectStatement, m_pos_Signature);
1012 IMPL_TYPED_CHILDREN(AuthenticationStatement, m_pos_Signature);
1013 IMPL_TYPED_CHILDREN(AttributeStatement, m_pos_Signature);
1014 IMPL_TYPED_CHILDREN(AuthorizationDecisionStatement, m_pos_Signature);
1017 void marshallAttributes(DOMElement* domElement) const {
1018 static const XMLCh MAJORVERSION[] = UNICODE_LITERAL_12(M,a,j,o,r,V,e,r,s,i,o,n);
1019 domElement->setAttributeNS(NULL,MAJORVERSION,XMLConstants::XML_ONE);
1020 if (!m_MinorVersion)
1021 const_cast<AssertionImpl*>(this)->m_MinorVersion=XMLString::replicate(XMLConstants::XML_ONE);
1022 MARSHALL_INTEGER_ATTRIB(MinorVersion,MINORVERSION,NULL);
1024 const_cast<AssertionImpl*>(this)->m_AssertionID=SAMLConfig::getConfig().generateIdentifier();
1025 MARSHALL_ID_ATTRIB(AssertionID,ASSERTIONID,NULL);
1026 MARSHALL_STRING_ATTRIB(Issuer,ISSUER,NULL);
1027 if (!m_IssueInstant) {
1028 const_cast<AssertionImpl*>(this)->m_IssueInstantEpoch=time(NULL);
1029 const_cast<AssertionImpl*>(this)->m_IssueInstant=new DateTime(m_IssueInstantEpoch);
1031 MARSHALL_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,NULL);
1034 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1035 PROC_TYPED_CHILD(Conditions,SAMLConstants::SAML1_NS,false);
1036 PROC_TYPED_CHILD(Advice,SAMLConstants::SAML1_NS,false);
1037 PROC_TYPED_CHILD(Signature,XMLConstants::XMLSIG_NS,false);
1038 PROC_TYPED_CHILDREN(AuthenticationStatement,SAMLConstants::SAML1_NS,false);
1039 PROC_TYPED_CHILDREN(AttributeStatement,SAMLConstants::SAML1_NS,false);
1040 PROC_TYPED_CHILDREN(AuthorizationDecisionStatement,SAMLConstants::SAML1_NS,false);
1041 PROC_TYPED_CHILDREN(SubjectStatement,SAMLConstants::SAML1_NS,true);
1042 PROC_TYPED_CHILDREN(Statement,SAMLConstants::SAML1_NS,true);
1043 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1046 void processAttribute(const DOMAttr* attribute) {
1047 static const XMLCh MAJORVERSION[] = UNICODE_LITERAL_12(M,a,j,o,r,V,e,r,s,i,o,n);
1048 if (XMLHelper::isNodeNamed(attribute,NULL,MAJORVERSION)) {
1049 if (!XMLString::equals(attribute->getValue(),XMLConstants::XML_ONE))
1050 throw UnmarshallingException("Assertion has invalid major version.");
1052 PROC_INTEGER_ATTRIB(MinorVersion,MINORVERSION,NULL);
1053 PROC_ID_ATTRIB(AssertionID,ASSERTIONID,NULL);
1054 PROC_STRING_ATTRIB(Issuer,ISSUER,NULL);
1055 PROC_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,NULL);
1062 #if defined (_MSC_VER)
1063 #pragma warning( pop )
1066 // Builder Implementations
1068 IMPL_XMLOBJECTBUILDER(Action);
1069 IMPL_XMLOBJECTBUILDER(Advice);
1070 IMPL_XMLOBJECTBUILDER(Assertion);
1071 IMPL_XMLOBJECTBUILDER(AssertionIDReference);
1072 IMPL_XMLOBJECTBUILDER(Attribute);
1073 IMPL_XMLOBJECTBUILDER(AttributeDesignator);
1074 IMPL_XMLOBJECTBUILDER(AttributeStatement);
1075 IMPL_XMLOBJECTBUILDER(AttributeValue);
1076 IMPL_XMLOBJECTBUILDER(Audience);
1077 IMPL_XMLOBJECTBUILDER(AudienceRestrictionCondition);
1078 IMPL_XMLOBJECTBUILDER(AuthenticationStatement);
1079 IMPL_XMLOBJECTBUILDER(AuthorizationDecisionStatement);
1080 IMPL_XMLOBJECTBUILDER(AuthorityBinding);
1081 IMPL_XMLOBJECTBUILDER(Conditions);
1082 IMPL_XMLOBJECTBUILDER(ConfirmationMethod);
1083 IMPL_XMLOBJECTBUILDER(DoNotCacheCondition);
1084 IMPL_XMLOBJECTBUILDER(Evidence);
1085 IMPL_XMLOBJECTBUILDER(NameIdentifier);
1086 IMPL_XMLOBJECTBUILDER(Subject);
1087 IMPL_XMLOBJECTBUILDER(SubjectConfirmation);
1088 IMPL_XMLOBJECTBUILDER(SubjectConfirmationData);
1089 IMPL_XMLOBJECTBUILDER(SubjectLocality);
1092 const XMLCh Action::LOCAL_NAME[] = UNICODE_LITERAL_6(A,c,t,i,o,n);
1093 const XMLCh Action::TYPE_NAME[] = UNICODE_LITERAL_10(A,c,t,i,o,n,T,y,p,e);
1094 const XMLCh Action::NAMESPACE_ATTRIB_NAME[] = UNICODE_LITERAL_9(N,a,m,e,s,p,a,c,e);
1095 const XMLCh Advice::LOCAL_NAME[] = UNICODE_LITERAL_6(A,d,v,i,c,e);
1096 const XMLCh Advice::TYPE_NAME[] = UNICODE_LITERAL_10(A,d,v,i,c,e,T,y,p,e);
1097 const XMLCh Assertion::LOCAL_NAME[] = UNICODE_LITERAL_9(A,s,s,e,r,t,i,o,n);
1098 const XMLCh Assertion::TYPE_NAME[] = UNICODE_LITERAL_13(A,s,s,e,r,t,i,o,n,T,y,p,e);
1099 const XMLCh Assertion::MINORVERSION_ATTRIB_NAME[] = UNICODE_LITERAL_12(M,i,n,o,r,V,e,r,s,i,o,n);
1100 const XMLCh Assertion::ASSERTIONID_ATTRIB_NAME[] = UNICODE_LITERAL_11(A,s,s,e,r,t,i,o,n,I,D);
1101 const XMLCh Assertion::ISSUER_ATTRIB_NAME[] = UNICODE_LITERAL_6(I,s,s,u,e,r);
1102 const XMLCh Assertion::ISSUEINSTANT_ATTRIB_NAME[] = UNICODE_LITERAL_12(I,s,s,u,e,I,n,s,t,a,n,t);
1103 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);
1104 const XMLCh Attribute::LOCAL_NAME[] = UNICODE_LITERAL_9(A,t,t,r,i,b,u,t,e);
1105 const XMLCh Attribute::TYPE_NAME[] = UNICODE_LITERAL_13(A,t,t,r,i,b,u,t,e,T,y,p,e);
1106 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);
1107 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);
1108 const XMLCh AttributeDesignator::ATTRIBUTENAME_ATTRIB_NAME[] = UNICODE_LITERAL_13(A,t,t,r,i,b,u,t,e,N,a,m,e);
1109 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);
1110 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);
1111 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);
1112 const XMLCh AttributeValue::LOCAL_NAME[] = UNICODE_LITERAL_14(A,t,t,r,i,b,u,t,e,V,a,l,u,e);
1113 const XMLCh Audience::LOCAL_NAME[] = UNICODE_LITERAL_8(A,u,d,i,e,n,c,e);
1114 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);
1115 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);
1116 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);
1117 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);
1118 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);
1119 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);
1120 const XMLCh AuthorityBinding::LOCAL_NAME[] = UNICODE_LITERAL_16(A,u,t,h,o,r,i,t,y,B,i,n,d,i,n,g);
1121 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);
1122 const XMLCh AuthorityBinding::AUTHORITYKIND_ATTRIB_NAME[] = UNICODE_LITERAL_13(A,u,t,h,o,r,i,t,y,K,i,n,d);
1123 const XMLCh AuthorityBinding::LOCATION_ATTRIB_NAME[] = UNICODE_LITERAL_8(L,o,c,a,t,i,o,n);
1124 const XMLCh AuthorityBinding::BINDING_ATTRIB_NAME[] = UNICODE_LITERAL_7(B,i,n,d,i,n,g);
1125 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);
1126 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);
1127 const XMLCh AuthorizationDecisionStatement::RESOURCE_ATTRIB_NAME[] = UNICODE_LITERAL_8(R,e,s,o,u,r,c,e);
1128 const XMLCh AuthorizationDecisionStatement::DECISION_ATTRIB_NAME[] = UNICODE_LITERAL_8(D,e,c,i,s,i,o,n);
1129 const XMLCh AuthorizationDecisionStatement::DECISION_PERMIT[] = UNICODE_LITERAL_6(P,e,r,m,i,t);
1130 const XMLCh AuthorizationDecisionStatement::DECISION_DENY[] = UNICODE_LITERAL_4(D,e,n,y);
1131 const XMLCh AuthorizationDecisionStatement::DECISION_INDETERMINATE[] = UNICODE_LITERAL_13(I,n,d,e,t,e,r,m,i,n,a,t,e);
1132 const XMLCh Condition::LOCAL_NAME[] = UNICODE_LITERAL_9(C,o,n,d,i,t,i,o,n);
1133 const XMLCh Conditions::LOCAL_NAME[] = UNICODE_LITERAL_10(C,o,n,d,i,t,i,o,n,s);
1134 const XMLCh Conditions::TYPE_NAME[] = UNICODE_LITERAL_14(C,o,n,d,i,t,i,o,n,s,T,y,p,e);
1135 const XMLCh Conditions::NOTBEFORE_ATTRIB_NAME[] = UNICODE_LITERAL_9(N,o,t,B,e,f,o,r,e);
1136 const XMLCh Conditions::NOTONORAFTER_ATTRIB_NAME[] =UNICODE_LITERAL_12(N,o,t,O,n,O,r,A,f,t,e,r);
1137 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);
1138 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);
1139 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);
1140 const XMLCh Evidence::LOCAL_NAME[] = UNICODE_LITERAL_8(E,v,i,d,e,n,c,e);
1141 const XMLCh Evidence::TYPE_NAME[] = UNICODE_LITERAL_12(E,v,i,d,e,n,c,e,T,y,p,e);
1142 const XMLCh NameIdentifier::LOCAL_NAME[] = UNICODE_LITERAL_14(N,a,m,e,I,d,e,n,t,i,f,i,e,r);
1143 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);
1144 const XMLCh NameIdentifier::NAMEQUALIFIER_ATTRIB_NAME[] = UNICODE_LITERAL_13(N,a,m,e,Q,u,a,l,i,f,i,e,r);
1145 const XMLCh NameIdentifier::FORMAT_ATTRIB_NAME[] = UNICODE_LITERAL_6(F,o,r,m,a,t);
1146 const XMLCh Statement::LOCAL_NAME[] = UNICODE_LITERAL_9(S,t,a,t,e,m,e,n,t);
1147 const XMLCh Subject::LOCAL_NAME[] = UNICODE_LITERAL_7(S,u,b,j,e,c,t);
1148 const XMLCh Subject::TYPE_NAME[] = UNICODE_LITERAL_11(S,u,b,j,e,c,t,T,y,p,e);
1149 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);
1150 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);
1151 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);
1152 const XMLCh SubjectLocality::LOCAL_NAME[] = UNICODE_LITERAL_15(S,u,b,j,e,c,t,L,o,c,a,l,i,t,y);
1153 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);
1154 const XMLCh SubjectLocality::IPADDRESS_ATTRIB_NAME[] = UNICODE_LITERAL_9(I,P,A,d,d,r,e,s,s);
1155 const XMLCh SubjectLocality::DNSADDRESS_ATTRIB_NAME[] = UNICODE_LITERAL_10(D,N,S,A,d,d,r,e,s,s);
1156 const XMLCh SubjectStatement::LOCAL_NAME[] = UNICODE_LITERAL_16(S,u,b,j,e,c,t,S,t,a,t,e,m,e,n,t);
1158 const XMLCh NameIdentifier::UNSPECIFIED[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified
1159 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1160 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1161 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1162 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1163 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1164 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
1167 const XMLCh NameIdentifier::EMAIL[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress
1168 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1169 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1170 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1171 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1172 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1173 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
1176 const XMLCh NameIdentifier::X509_SUBJECT[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName
1177 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1178 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1179 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1180 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1181 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1182 chLatin_X, chDigit_5, chDigit_0, chDigit_9, chLatin_S, chLatin_u, chLatin_b, chLatin_j, chLatin_e, chLatin_c, chLatin_t,
1183 chLatin_N, chLatin_a, chLatin_m, chLatin_e, chNull
1186 const XMLCh NameIdentifier::WIN_DOMAIN_QUALIFIED[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName
1187 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1188 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1189 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1190 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1191 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1192 chLatin_W, chLatin_i, chLatin_n, chLatin_d, chLatin_o, chLatin_w, chLatin_s,
1193 chLatin_D, chLatin_o, chLatin_m, chLatin_a, chLatin_i, chLatin_n,
1194 chLatin_Q, chLatin_u, chLatin_a, chLatin_l, chLatin_i, chLatin_f, chLatin_i, chLatin_e, chLatin_d,
1195 chLatin_N, chLatin_a, chLatin_m, chLatin_e, chNull
1198 const XMLCh SubjectConfirmation::ARTIFACT01[] = // urn:oasis:names:tc:SAML:1.0:cm:artifact-01
1199 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1200 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1201 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1202 chLatin_c, chLatin_m, chColon, chLatin_a, chLatin_r, chLatin_t, chLatin_i, chLatin_f, chLatin_a, chLatin_c, chLatin_t,
1203 chDash, chDigit_0, chDigit_1, chNull
1206 const XMLCh SubjectConfirmation::ARTIFACT[] = // urn:oasis:names:tc:SAML:1.0:cm:artifact
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, chNull
1213 const XMLCh SubjectConfirmation::BEARER[] = // urn:oasis:names:tc:SAML:1.0:cm:bearer
1214 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1215 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1216 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1217 chLatin_c, chLatin_m, chColon, chLatin_b, chLatin_e, chLatin_a, chLatin_r, chLatin_e, chLatin_r, chNull
1220 const XMLCh SubjectConfirmation::HOLDER_KEY[] = // urn:oasis:names:tc:SAML:1.0:cm:holder-of-key
1221 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1222 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1223 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1224 chLatin_c, chLatin_m, chColon, chLatin_h, chLatin_o, chLatin_l, chLatin_d, chLatin_e, chLatin_r, chDash,
1225 chLatin_o, chLatin_f, chDash, chLatin_k, chLatin_e, chLatin_y, chNull
1228 const XMLCh SubjectConfirmation::SENDER_VOUCHES[] = // urn:oasis:names:tc:SAML:1.0:cm:sender-vouches
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_s, chLatin_e, chLatin_n, chLatin_d, chLatin_e, chLatin_r, chDash,
1233 chLatin_v, chLatin_o, chLatin_u, chLatin_c, chLatin_h, chLatin_e, chLatin_s, chNull
1236 const XMLCh Action::RWEDC_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:rwedc
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_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1241 chLatin_r, chLatin_w, chLatin_e, chLatin_d, chLatin_c, chNull
1244 const XMLCh Action::RWEDC_NEG_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:rwedc-negation
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, chDash,
1250 chLatin_n, chLatin_e, chLatin_g, chLatin_a, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chNull
1253 const XMLCh Action::GHPP_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:ghpp
1254 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1255 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1256 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1257 chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1258 chLatin_g, chLatin_h, chLatin_p, chLatin_p, chNull
1261 const XMLCh Action::UNIX_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:unix
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_u, chLatin_n, chLatin_i, chLatin_x, chNull