2 * Copyright 2001-2007 Internet2
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
20 * Implementation classes for SAML 1.x Assertions schema
24 #include "exceptions.h"
25 #include "saml1/core/Assertions.h"
27 #include <xmltooling/AbstractComplexElement.h>
28 #include <xmltooling/AbstractSimpleElement.h>
29 #include <xmltooling/impl/AnyElement.h>
30 #include <xmltooling/io/AbstractXMLObjectMarshaller.h>
31 #include <xmltooling/io/AbstractXMLObjectUnmarshaller.h>
32 #include <xmltooling/util/XMLHelper.h>
36 #include <xercesc/util/XMLUniDefs.hpp>
38 using namespace opensaml::saml1;
39 using namespace xmlsignature;
40 using namespace xmltooling;
42 using xmlconstants::XMLSIG_NS;
43 using xmlconstants::XML_ONE;
44 using samlconstants::SAML1_NS;
46 #if defined (_MSC_VER)
47 #pragma warning( push )
48 #pragma warning( disable : 4250 4251 )
54 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AssertionIDReference);
55 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,Audience);
56 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,ConfirmationMethod);
58 class SAML_DLLLOCAL 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), AbstractComplexElement(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,SAML1_NS,false);
90 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
94 class SAML_DLLLOCAL DoNotCacheConditionImpl : public virtual DoNotCacheCondition,
95 public AbstractSimpleElement,
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)
108 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
111 IMPL_XMLOBJECT_CLONE(DoNotCacheCondition);
112 Condition* cloneCondition() const {
113 return cloneDoNotCacheCondition();
117 class SAML_DLLLOCAL ConditionsImpl : public virtual Conditions,
118 public AbstractComplexElement,
119 public AbstractDOMCachingXMLObject,
120 public AbstractXMLObjectMarshaller,
121 public AbstractXMLObjectUnmarshaller
124 virtual ~ConditionsImpl() {
126 delete m_NotOnOrAfter;
129 ConditionsImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
130 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
134 ConditionsImpl(const ConditionsImpl& src)
135 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
137 setNotBefore(src.getNotBefore());
138 setNotOnOrAfter(src.getNotOnOrAfter());
140 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
142 AudienceRestrictionCondition* arc=dynamic_cast<AudienceRestrictionCondition*>(*i);
144 getAudienceRestrictionConditions().push_back(arc->cloneAudienceRestrictionCondition());
148 DoNotCacheCondition* dncc=dynamic_cast<DoNotCacheCondition*>(*i);
150 getDoNotCacheConditions().push_back(dncc->cloneDoNotCacheCondition());
154 Condition* c=dynamic_cast<Condition*>(*i);
156 getConditions().push_back(c->cloneCondition());
164 m_NotBefore=m_NotOnOrAfter=NULL;
167 IMPL_XMLOBJECT_CLONE(Conditions);
168 IMPL_DATETIME_ATTRIB(NotBefore,0);
169 IMPL_DATETIME_ATTRIB(NotOnOrAfter,SAMLTIME_MAX);
170 IMPL_TYPED_CHILDREN(AudienceRestrictionCondition, m_children.end());
171 IMPL_TYPED_CHILDREN(DoNotCacheCondition,m_children.end());
172 IMPL_TYPED_CHILDREN(Condition,m_children.end());
175 void marshallAttributes(DOMElement* domElement) const {
176 MARSHALL_DATETIME_ATTRIB(NotBefore,NOTBEFORE,NULL);
177 MARSHALL_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,NULL);
180 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
181 PROC_TYPED_CHILDREN(AudienceRestrictionCondition,SAML1_NS,true);
182 PROC_TYPED_CHILDREN(DoNotCacheCondition,SAML1_NS,true);
183 PROC_TYPED_CHILDREN(Condition,SAML1_NS,true);
184 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
187 void processAttribute(const DOMAttr* attribute) {
188 PROC_DATETIME_ATTRIB(NotBefore,NOTBEFORE,NULL);
189 PROC_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,NULL);
193 class SAML_DLLLOCAL NameIdentifierImpl : public virtual NameIdentifier,
194 public AbstractSimpleElement,
195 public AbstractDOMCachingXMLObject,
196 public AbstractXMLObjectMarshaller,
197 public AbstractXMLObjectUnmarshaller
200 virtual ~NameIdentifierImpl() {
201 XMLString::release(&m_Format);
202 XMLString::release(&m_NameQualifier);
205 NameIdentifierImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
206 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
210 NameIdentifierImpl(const NameIdentifierImpl& src)
211 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
213 setFormat(src.getFormat());
214 setNameQualifier(src.getNameQualifier());
218 m_Format=m_NameQualifier=NULL;
221 IMPL_XMLOBJECT_CLONE(NameIdentifier);
222 IMPL_STRING_ATTRIB(Format);
223 IMPL_STRING_ATTRIB(NameQualifier);
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) : AnyElementImpl(src) {
249 IMPL_XMLOBJECT_CLONE(SubjectConfirmationData);
252 class SAML_DLLLOCAL SubjectConfirmationImpl : public virtual SubjectConfirmation,
253 public AbstractComplexElement,
254 public AbstractDOMCachingXMLObject,
255 public AbstractXMLObjectMarshaller,
256 public AbstractXMLObjectUnmarshaller
259 virtual ~SubjectConfirmationImpl() {}
261 SubjectConfirmationImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
262 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
266 SubjectConfirmationImpl(const SubjectConfirmationImpl& src)
267 : AbstractXMLObject(src), AbstractComplexElement(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,SAML1_NS,false);
299 PROC_TYPED_CHILD(KeyInfo,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)
323 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
325 if (src.getNameIdentifier())
326 setNameIdentifier(src.getNameIdentifier()->cloneNameIdentifier());
327 if (src.getSubjectConfirmation())
328 setSubjectConfirmation(src.getSubjectConfirmation()->cloneSubjectConfirmation());
332 m_NameIdentifier=NULL;
333 m_SubjectConfirmation=NULL;
334 m_children.push_back(NULL);
335 m_children.push_back(NULL);
336 m_pos_NameIdentifier=m_children.begin();
337 m_pos_SubjectConfirmation=m_pos_NameIdentifier;
338 ++m_pos_SubjectConfirmation;
341 IMPL_XMLOBJECT_CLONE(Subject);
342 IMPL_TYPED_CHILD(NameIdentifier);
343 IMPL_TYPED_CHILD(SubjectConfirmation);
346 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
347 PROC_TYPED_CHILD(NameIdentifier,SAML1_NS,true);
348 PROC_TYPED_CHILD(SubjectConfirmation,SAML1_NS,true);
349 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
353 class SAML_DLLLOCAL SubjectStatementImpl : public virtual SubjectStatement,
354 public AbstractComplexElement,
355 public AbstractDOMCachingXMLObject,
356 public AbstractXMLObjectMarshaller,
357 public AbstractXMLObjectUnmarshaller
361 m_children.push_back(NULL);
362 m_pos_Subject=m_children.begin();
365 SubjectStatementImpl() {
369 virtual ~SubjectStatementImpl() {}
371 SubjectStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
372 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
376 SubjectStatementImpl(const SubjectStatementImpl& src)
377 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
379 if (src.getSubject())
380 setSubject(src.getSubject()->cloneSubject());
383 IMPL_TYPED_CHILD(Subject);
386 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
387 PROC_TYPED_CHILD(Subject,SAML1_NS,true);
388 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
392 class SAML_DLLLOCAL SubjectLocalityImpl : public virtual SubjectLocality,
393 public AbstractSimpleElement,
394 public AbstractDOMCachingXMLObject,
395 public AbstractXMLObjectMarshaller,
396 public AbstractXMLObjectUnmarshaller
399 virtual ~SubjectLocalityImpl() {
400 XMLString::release(&m_IPAddress);
401 XMLString::release(&m_DNSAddress);
404 SubjectLocalityImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
405 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
409 SubjectLocalityImpl(const SubjectLocalityImpl& src)
410 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
412 setIPAddress(src.getIPAddress());
413 setDNSAddress(src.getDNSAddress());
417 m_IPAddress=m_DNSAddress=NULL;
420 IMPL_XMLOBJECT_CLONE(SubjectLocality);
421 IMPL_STRING_ATTRIB(IPAddress);
422 IMPL_STRING_ATTRIB(DNSAddress);
425 void marshallAttributes(DOMElement* domElement) const {
426 MARSHALL_STRING_ATTRIB(IPAddress,IPADDRESS,NULL);
427 MARSHALL_STRING_ATTRIB(DNSAddress,DNSADDRESS,NULL);
430 void processAttribute(const DOMAttr* attribute) {
431 PROC_STRING_ATTRIB(IPAddress,IPADDRESS,NULL);
432 PROC_STRING_ATTRIB(DNSAddress,DNSADDRESS,NULL);
436 class SAML_DLLLOCAL AuthorityBindingImpl : public virtual AuthorityBinding,
437 public AbstractSimpleElement,
438 public AbstractDOMCachingXMLObject,
439 public AbstractXMLObjectMarshaller,
440 public AbstractXMLObjectUnmarshaller
443 virtual ~AuthorityBindingImpl() {
444 delete m_AuthorityKind;
445 XMLString::release(&m_Location);
446 XMLString::release(&m_Binding);
449 AuthorityBindingImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
450 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
454 AuthorityBindingImpl(const AuthorityBindingImpl& src)
455 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
457 setAuthorityKind(src.getAuthorityKind());
458 setLocation(src.getLocation());
459 setBinding(src.getBinding());
463 m_AuthorityKind=NULL;
464 m_Location=m_Binding=NULL;
467 IMPL_XMLOBJECT_CLONE(AuthorityBinding);
468 IMPL_XMLOBJECT_ATTRIB(AuthorityKind,QName);
469 IMPL_STRING_ATTRIB(Location);
470 IMPL_STRING_ATTRIB(Binding);
473 void marshallAttributes(DOMElement* domElement) const {
474 MARSHALL_QNAME_ATTRIB(AuthorityKind,AUTHORITYKIND,NULL);
475 MARSHALL_STRING_ATTRIB(Location,LOCATION,NULL);
476 MARSHALL_STRING_ATTRIB(Binding,BINDING,NULL);
479 void processAttribute(const DOMAttr* attribute) {
480 PROC_QNAME_ATTRIB(AuthorityKind,AUTHORITYKIND,NULL);
481 PROC_STRING_ATTRIB(Location,LOCATION,NULL);
482 PROC_STRING_ATTRIB(Binding,BINDING,NULL);
486 class SAML_DLLLOCAL AuthenticationStatementImpl : public virtual AuthenticationStatement, public SubjectStatementImpl
489 virtual ~AuthenticationStatementImpl() {
490 XMLString::release(&m_AuthenticationMethod);
491 delete m_AuthenticationInstant;
494 AuthenticationStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
495 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
499 AuthenticationStatementImpl(const AuthenticationStatementImpl& src) : AbstractXMLObject(src), SubjectStatementImpl(src) {
501 setAuthenticationMethod(src.getAuthenticationMethod());
502 setAuthenticationInstant(src.getAuthenticationInstant());
503 if (src.getSubjectLocality())
504 setSubjectLocality(src.getSubjectLocality()->cloneSubjectLocality());
505 VectorOf(AuthorityBinding) v=getAuthorityBindings();
506 for (vector<AuthorityBinding*>::const_iterator i=src.m_AuthorityBindings.begin(); i!=src.m_AuthorityBindings.end(); i++) {
508 v.push_back((*i)->cloneAuthorityBinding());
514 m_AuthenticationMethod=NULL;
515 m_AuthenticationInstant=NULL;
516 m_SubjectLocality=NULL;
517 m_children.push_back(NULL);
518 m_pos_SubjectLocality=m_pos_Subject;
519 ++m_pos_SubjectLocality;
522 IMPL_XMLOBJECT_CLONE(AuthenticationStatement);
523 SubjectStatement* cloneSubjectStatement() const {
524 return cloneAuthenticationStatement();
526 Statement* cloneStatement() const {
527 return cloneAuthenticationStatement();
529 IMPL_STRING_ATTRIB(AuthenticationMethod);
530 IMPL_DATETIME_ATTRIB(AuthenticationInstant,0);
531 IMPL_TYPED_CHILD(SubjectLocality);
532 IMPL_TYPED_CHILDREN(AuthorityBinding, m_children.end());
535 void marshallAttributes(DOMElement* domElement) const {
536 MARSHALL_STRING_ATTRIB(AuthenticationMethod,AUTHENTICATIONMETHOD,NULL);
537 MARSHALL_DATETIME_ATTRIB(AuthenticationInstant,AUTHENTICATIONINSTANT,NULL);
538 SubjectStatementImpl::marshallAttributes(domElement);
541 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
542 PROC_TYPED_CHILD(SubjectLocality,SAML1_NS,false);
543 PROC_TYPED_CHILDREN(AuthorityBinding,SAML1_NS,false);
544 SubjectStatementImpl::processChildElement(childXMLObject,root);
547 void processAttribute(const DOMAttr* attribute) {
548 PROC_STRING_ATTRIB(AuthenticationMethod,AUTHENTICATIONMETHOD,NULL);
549 PROC_DATETIME_ATTRIB(AuthenticationInstant,AUTHENTICATIONINSTANT,NULL);
550 SubjectStatementImpl::processAttribute(attribute);
554 class SAML_DLLLOCAL ActionImpl : public virtual Action,
555 public AbstractSimpleElement,
556 public AbstractDOMCachingXMLObject,
557 public AbstractXMLObjectMarshaller,
558 public AbstractXMLObjectUnmarshaller
561 virtual ~ActionImpl() {
562 XMLString::release(&m_Namespace);
565 ActionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
566 : AbstractXMLObject(nsURI, localName, prefix, schemaType), m_Namespace(NULL) {
569 ActionImpl(const ActionImpl& src) : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
570 setNamespace(src.getNamespace());
573 IMPL_XMLOBJECT_CLONE(Action);
574 IMPL_STRING_ATTRIB(Namespace);
577 void marshallAttributes(DOMElement* domElement) const {
578 MARSHALL_STRING_ATTRIB(Namespace,NAMESPACE,NULL);
581 void processAttribute(const DOMAttr* attribute) {
582 PROC_STRING_ATTRIB(Namespace,NAMESPACE,NULL);
586 class SAML_DLLLOCAL EvidenceImpl : public virtual Evidence,
587 public AbstractComplexElement,
588 public AbstractDOMCachingXMLObject,
589 public AbstractXMLObjectMarshaller,
590 public AbstractXMLObjectUnmarshaller
593 virtual ~EvidenceImpl() {}
595 EvidenceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
596 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
599 EvidenceImpl(const EvidenceImpl& src)
600 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
601 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
603 AssertionIDReference* ref=dynamic_cast<AssertionIDReference*>(*i);
605 getAssertionIDReferences().push_back(ref->cloneAssertionIDReference());
609 Assertion* assertion=dynamic_cast<Assertion*>(*i);
611 getAssertions().push_back(assertion->cloneAssertion());
618 IMPL_XMLOBJECT_CLONE(Evidence);
619 IMPL_TYPED_CHILDREN(AssertionIDReference,m_children.end());
620 IMPL_TYPED_CHILDREN(Assertion,m_children.end());
623 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
624 PROC_TYPED_CHILDREN(AssertionIDReference,SAML1_NS,false);
625 PROC_TYPED_CHILDREN(Assertion,SAML1_NS,true);
626 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
630 class SAML_DLLLOCAL AuthorizationDecisionStatementImpl
631 : public virtual AuthorizationDecisionStatement, public SubjectStatementImpl
634 virtual ~AuthorizationDecisionStatementImpl() {
635 XMLString::release(&m_Resource);
636 XMLString::release(&m_Decision);
639 AuthorizationDecisionStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
640 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
644 AuthorizationDecisionStatementImpl(const AuthorizationDecisionStatementImpl& src)
645 : AbstractXMLObject(src), SubjectStatementImpl(src) {
647 setResource(src.getResource());
648 setDecision(src.getDecision());
649 if (src.getEvidence())
650 setEvidence(src.getEvidence()->cloneEvidence());
651 VectorOf(Action) v=getActions();
652 for (vector<Action*>::const_iterator i=src.m_Actions.begin(); i!=src.m_Actions.end(); i++) {
654 v.push_back((*i)->cloneAction());
663 m_children.push_back(NULL);
664 m_pos_Evidence=m_pos_Subject;
668 IMPL_XMLOBJECT_CLONE(AuthorizationDecisionStatement);
669 SubjectStatement* cloneSubjectStatement() const {
670 return cloneAuthorizationDecisionStatement();
672 Statement* cloneStatement() const {
673 return cloneAuthorizationDecisionStatement();
675 IMPL_STRING_ATTRIB(Resource);
676 IMPL_STRING_ATTRIB(Decision);
677 IMPL_TYPED_CHILD(Evidence);
678 IMPL_TYPED_CHILDREN(Action, m_pos_Evidence);
681 void marshallAttributes(DOMElement* domElement) const {
682 MARSHALL_STRING_ATTRIB(Resource,RESOURCE,NULL);
683 MARSHALL_STRING_ATTRIB(Decision,DECISION,NULL);
684 SubjectStatementImpl::marshallAttributes(domElement);
687 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
688 PROC_TYPED_CHILD(Evidence,SAML1_NS,false);
689 PROC_TYPED_CHILDREN(Action,SAML1_NS,false);
690 SubjectStatementImpl::processChildElement(childXMLObject,root);
693 void processAttribute(const DOMAttr* attribute) {
694 PROC_STRING_ATTRIB(Resource,RESOURCE,NULL);
695 PROC_STRING_ATTRIB(Decision,DECISION,NULL);
696 SubjectStatementImpl::processAttribute(attribute);
700 class SAML_DLLLOCAL AttributeDesignatorImpl : public virtual AttributeDesignator,
701 public AbstractSimpleElement,
702 public AbstractDOMCachingXMLObject,
703 public AbstractXMLObjectMarshaller,
704 public AbstractXMLObjectUnmarshaller
707 virtual ~AttributeDesignatorImpl() {
708 XMLString::release(&m_AttributeName);
709 XMLString::release(&m_AttributeNamespace);
712 AttributeDesignatorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
713 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
717 AttributeDesignatorImpl(const AttributeDesignatorImpl& src)
718 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
720 setAttributeName(src.getAttributeName());
721 setAttributeNamespace(src.getAttributeNamespace());
725 m_AttributeName=m_AttributeNamespace=NULL;
728 IMPL_XMLOBJECT_CLONE(AttributeDesignator);
729 IMPL_STRING_ATTRIB(AttributeName);
730 IMPL_STRING_ATTRIB(AttributeNamespace);
733 void marshallAttributes(DOMElement* domElement) const {
734 MARSHALL_STRING_ATTRIB(AttributeName,ATTRIBUTENAME,NULL);
735 MARSHALL_STRING_ATTRIB(AttributeNamespace,ATTRIBUTENAMESPACE,NULL);
738 void processAttribute(const DOMAttr* attribute) {
739 PROC_STRING_ATTRIB(AttributeName,ATTRIBUTENAME,NULL);
740 PROC_STRING_ATTRIB(AttributeNamespace,ATTRIBUTENAMESPACE,NULL);
744 class SAML_DLLLOCAL AttributeImpl : public virtual Attribute,
745 public AbstractComplexElement,
746 public AbstractDOMCachingXMLObject,
747 public AbstractXMLObjectMarshaller,
748 public AbstractXMLObjectUnmarshaller
751 virtual ~AttributeImpl() {
752 XMLString::release(&m_AttributeName);
753 XMLString::release(&m_AttributeNamespace);
756 AttributeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
757 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
761 AttributeImpl(const AttributeImpl& src)
762 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
764 setAttributeName(src.getAttributeName());
765 setAttributeNamespace(src.getAttributeNamespace());
766 VectorOf(XMLObject) v=getAttributeValues();
767 for (vector<XMLObject*>::const_iterator i=src.m_AttributeValues.begin(); i!=src.m_AttributeValues.end(); i++) {
769 v.push_back((*i)->clone());
775 m_AttributeName=m_AttributeNamespace=NULL;
778 IMPL_XMLOBJECT_CLONE(Attribute);
779 AttributeDesignator* cloneAttributeDesignator() const {
780 return cloneAttribute();
782 IMPL_STRING_ATTRIB(AttributeName);
783 IMPL_STRING_ATTRIB(AttributeNamespace);
784 IMPL_XMLOBJECT_CHILDREN(AttributeValue,m_children.end());
787 void marshallAttributes(DOMElement* domElement) const {
788 MARSHALL_STRING_ATTRIB(AttributeName,ATTRIBUTENAME,NULL);
789 MARSHALL_STRING_ATTRIB(AttributeNamespace,ATTRIBUTENAMESPACE,NULL);
792 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
793 getAttributeValues().push_back(childXMLObject);
796 void processAttribute(const DOMAttr* attribute) {
797 PROC_STRING_ATTRIB(AttributeName,ATTRIBUTENAME,NULL);
798 PROC_STRING_ATTRIB(AttributeNamespace,ATTRIBUTENAMESPACE,NULL);
802 class SAML_DLLLOCAL AttributeValueImpl : public virtual AttributeValue, public AnyElementImpl
805 virtual ~AttributeValueImpl() {}
807 AttributeValueImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
808 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
811 AttributeValueImpl(const AttributeValueImpl& src) : AnyElementImpl(src) {}
813 IMPL_XMLOBJECT_CLONE(AttributeValue);
816 class SAML_DLLLOCAL AttributeStatementImpl : public virtual AttributeStatement, public SubjectStatementImpl
819 virtual ~AttributeStatementImpl() {}
821 AttributeStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
822 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
825 AttributeStatementImpl(const AttributeStatementImpl& src)
826 : AbstractXMLObject(src), SubjectStatementImpl(src) {
827 VectorOf(Attribute) v=getAttributes();
828 for (vector<Attribute*>::const_iterator i=src.m_Attributes.begin(); i!=src.m_Attributes.end(); i++) {
830 v.push_back((*i)->cloneAttribute());
835 IMPL_XMLOBJECT_CLONE(AttributeStatement);
836 SubjectStatement* cloneSubjectStatement() const {
837 return cloneAttributeStatement();
839 Statement* cloneStatement() const {
840 return cloneAttributeStatement();
842 IMPL_TYPED_CHILDREN(Attribute, m_children.end());
845 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
846 PROC_TYPED_CHILDREN(Attribute,SAML1_NS,true);
847 SubjectStatementImpl::processChildElement(childXMLObject,root);
851 class SAML_DLLLOCAL AdviceImpl : public virtual Advice,
852 public AbstractComplexElement,
853 public AbstractDOMCachingXMLObject,
854 public AbstractXMLObjectMarshaller,
855 public AbstractXMLObjectUnmarshaller
858 virtual ~AdviceImpl() {}
860 AdviceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
861 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
864 AdviceImpl(const AdviceImpl& src)
865 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
866 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
868 AssertionIDReference* ref=dynamic_cast<AssertionIDReference*>(*i);
870 getAssertionIDReferences().push_back(ref->cloneAssertionIDReference());
874 Assertion* assertion=dynamic_cast<Assertion*>(*i);
876 getAssertions().push_back(assertion->cloneAssertion());
880 getUnknownXMLObjects().push_back((*i)->clone());
885 IMPL_XMLOBJECT_CLONE(Advice);
886 IMPL_TYPED_CHILDREN(AssertionIDReference,m_children.end());
887 IMPL_TYPED_CHILDREN(Assertion,m_children.end());
888 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
891 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
892 PROC_TYPED_CHILDREN(AssertionIDReference,SAML1_NS,false);
893 PROC_TYPED_CHILDREN(Assertion,SAML1_NS,true);
896 const XMLCh* nsURI=root->getNamespaceURI();
897 if (!XMLString::equals(nsURI,SAML1_NS) && nsURI && *nsURI) {
898 getUnknownXMLObjects().push_back(childXMLObject);
902 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
906 class SAML_DLLLOCAL AssertionImpl : public virtual Assertion,
907 public AbstractComplexElement,
908 public AbstractDOMCachingXMLObject,
909 public AbstractXMLObjectMarshaller,
910 public AbstractXMLObjectUnmarshaller
917 m_children.push_back(NULL);
918 m_children.push_back(NULL);
919 m_children.push_back(NULL);
923 m_pos_Conditions=m_children.begin();
924 m_pos_Advice=m_pos_Conditions;
926 m_pos_Signature=m_pos_Advice;
930 virtual ~AssertionImpl() {
931 XMLString::release(&m_MinorVersion);
932 XMLString::release(&m_AssertionID);
933 XMLString::release(&m_Issuer);
934 delete m_IssueInstant;
937 AssertionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
938 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
942 AssertionImpl(const AssertionImpl& src)
943 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
945 setMinorVersion(src.m_MinorVersion);
946 setAssertionID(src.getAssertionID());
947 setIssuer(src.getIssuer());
948 setIssueInstant(src.getIssueInstant());
949 if (src.getConditions())
950 setConditions(src.getConditions()->cloneConditions());
952 setAdvice(src.getAdvice()->cloneAdvice());
953 if (src.getSignature())
954 setSignature(src.getSignature()->cloneSignature());
955 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
957 AuthenticationStatement* authst=dynamic_cast<AuthenticationStatement*>(*i);
959 getAuthenticationStatements().push_back(authst->cloneAuthenticationStatement());
963 AttributeStatement* attst=dynamic_cast<AttributeStatement*>(*i);
965 getAttributeStatements().push_back(attst->cloneAttributeStatement());
969 AuthorizationDecisionStatement* authzst=dynamic_cast<AuthorizationDecisionStatement*>(*i);
971 getAuthorizationDecisionStatements().push_back(authzst->cloneAuthorizationDecisionStatement());
975 SubjectStatement* subst=dynamic_cast<SubjectStatement*>(*i);
977 getSubjectStatements().push_back(subst->cloneSubjectStatement());
981 Statement* st=dynamic_cast<Statement*>(*i);
983 getStatements().push_back(st->cloneStatement());
990 //IMPL_TYPED_CHILD(Signature);
991 // Need customized setter.
993 Signature* m_Signature;
994 list<XMLObject*>::iterator m_pos_Signature;
996 Signature* getSignature() const {
1000 void setSignature(Signature* sig) {
1001 prepareForAssignment(m_Signature,sig);
1002 *m_pos_Signature=m_Signature=sig;
1003 // Sync content reference back up.
1004 if (m_Signature && (!m_AssertionID || *m_AssertionID!=chDigit_0))
1005 m_Signature->setContentReference(new opensaml::ContentReference(*this));
1008 IMPL_XMLOBJECT_CLONE(Assertion);
1009 IMPL_INTEGER_ATTRIB(MinorVersion);
1010 IMPL_STRING_ATTRIB(AssertionID); // have to special-case getXMLID
1011 const XMLCh* getXMLID() const {
1012 pair<bool,int> v = getMinorVersion();
1013 return (!v.first || v.second > 0) ? m_AssertionID : NULL;
1015 const XMLCh* getID() const {
1016 return getAssertionID();
1018 IMPL_STRING_ATTRIB(Issuer);
1019 IMPL_DATETIME_ATTRIB(IssueInstant,0);
1020 IMPL_TYPED_CHILD(Conditions);
1021 IMPL_TYPED_CHILD(Advice);
1022 IMPL_TYPED_CHILDREN(Statement, m_pos_Signature);
1023 IMPL_TYPED_CHILDREN(SubjectStatement, m_pos_Signature);
1024 IMPL_TYPED_CHILDREN(AuthenticationStatement, m_pos_Signature);
1025 IMPL_TYPED_CHILDREN(AttributeStatement, m_pos_Signature);
1026 IMPL_TYPED_CHILDREN(AuthorizationDecisionStatement, m_pos_Signature);
1029 void marshallAttributes(DOMElement* domElement) const {
1030 static const XMLCh MAJORVERSION[] = UNICODE_LITERAL_12(M,a,j,o,r,V,e,r,s,i,o,n);
1031 domElement->setAttributeNS(NULL,MAJORVERSION,XML_ONE);
1032 if (!m_MinorVersion)
1033 const_cast<AssertionImpl*>(this)->m_MinorVersion=XMLString::replicate(XML_ONE);
1034 MARSHALL_INTEGER_ATTRIB(MinorVersion,MINORVERSION,NULL);
1036 const_cast<AssertionImpl*>(this)->m_AssertionID=SAMLConfig::getConfig().generateIdentifier();
1037 domElement->setAttributeNS(NULL, ASSERTIONID_ATTRIB_NAME, m_AssertionID);
\r
1038 if (*m_MinorVersion!=chDigit_0)
\r
1039 domElement->setIdAttributeNS(NULL, ASSERTIONID_ATTRIB_NAME);
\r
1040 MARSHALL_STRING_ATTRIB(Issuer,ISSUER,NULL);
1041 if (!m_IssueInstant) {
1042 const_cast<AssertionImpl*>(this)->m_IssueInstantEpoch=time(NULL);
1043 const_cast<AssertionImpl*>(this)->m_IssueInstant=new DateTime(m_IssueInstantEpoch);
1045 MARSHALL_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,NULL);
1048 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1049 PROC_TYPED_CHILD(Conditions,SAML1_NS,false);
1050 PROC_TYPED_CHILD(Advice,SAML1_NS,false);
1051 PROC_TYPED_CHILD(Signature,XMLSIG_NS,false);
1052 PROC_TYPED_CHILDREN(AuthenticationStatement,SAML1_NS,false);
1053 PROC_TYPED_CHILDREN(AttributeStatement,SAML1_NS,false);
1054 PROC_TYPED_CHILDREN(AuthorizationDecisionStatement,SAML1_NS,false);
1055 PROC_TYPED_CHILDREN(SubjectStatement,SAML1_NS,true);
1056 PROC_TYPED_CHILDREN(Statement,SAML1_NS,true);
1057 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1060 void unmarshallAttributes(const DOMElement* domElement) {
1061 // Standard processing, but then we check IDness.
1062 AbstractXMLObjectUnmarshaller::unmarshallAttributes(domElement);
1063 if (m_AssertionID && (!m_MinorVersion || *m_MinorVersion!=chDigit_0))
1064 const_cast<DOMElement*>(domElement)->setIdAttributeNS(NULL, ASSERTIONID_ATTRIB_NAME);
1067 void processAttribute(const DOMAttr* attribute) {
1068 static const XMLCh MAJORVERSION[] = UNICODE_LITERAL_12(M,a,j,o,r,V,e,r,s,i,o,n);
1069 if (XMLHelper::isNodeNamed(attribute,NULL,MAJORVERSION)) {
1070 if (!XMLString::equals(attribute->getValue(),XML_ONE))
1071 throw UnmarshallingException("Assertion has invalid major version.");
1073 PROC_INTEGER_ATTRIB(MinorVersion,MINORVERSION,NULL);
1074 PROC_STRING_ATTRIB(AssertionID,ASSERTIONID,NULL);
1075 PROC_STRING_ATTRIB(Issuer,ISSUER,NULL);
1076 PROC_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,NULL);
1083 #if defined (_MSC_VER)
1084 #pragma warning( pop )
1087 // Builder Implementations
1089 IMPL_XMLOBJECTBUILDER(Action);
1090 IMPL_XMLOBJECTBUILDER(Advice);
1091 IMPL_XMLOBJECTBUILDER(Assertion);
1092 IMPL_XMLOBJECTBUILDER(AssertionIDReference);
1093 IMPL_XMLOBJECTBUILDER(Attribute);
1094 IMPL_XMLOBJECTBUILDER(AttributeDesignator);
1095 IMPL_XMLOBJECTBUILDER(AttributeStatement);
1096 IMPL_XMLOBJECTBUILDER(AttributeValue);
1097 IMPL_XMLOBJECTBUILDER(Audience);
1098 IMPL_XMLOBJECTBUILDER(AudienceRestrictionCondition);
1099 IMPL_XMLOBJECTBUILDER(AuthenticationStatement);
1100 IMPL_XMLOBJECTBUILDER(AuthorizationDecisionStatement);
1101 IMPL_XMLOBJECTBUILDER(AuthorityBinding);
1102 IMPL_XMLOBJECTBUILDER(Conditions);
1103 IMPL_XMLOBJECTBUILDER(ConfirmationMethod);
1104 IMPL_XMLOBJECTBUILDER(DoNotCacheCondition);
1105 IMPL_XMLOBJECTBUILDER(Evidence);
1106 IMPL_XMLOBJECTBUILDER(NameIdentifier);
1107 IMPL_XMLOBJECTBUILDER(Subject);
1108 IMPL_XMLOBJECTBUILDER(SubjectConfirmation);
1109 IMPL_XMLOBJECTBUILDER(SubjectConfirmationData);
1110 IMPL_XMLOBJECTBUILDER(SubjectLocality);
1113 const XMLCh Action::LOCAL_NAME[] = UNICODE_LITERAL_6(A,c,t,i,o,n);
1114 const XMLCh Action::TYPE_NAME[] = UNICODE_LITERAL_10(A,c,t,i,o,n,T,y,p,e);
1115 const XMLCh Action::NAMESPACE_ATTRIB_NAME[] = UNICODE_LITERAL_9(N,a,m,e,s,p,a,c,e);
1116 const XMLCh Advice::LOCAL_NAME[] = UNICODE_LITERAL_6(A,d,v,i,c,e);
1117 const XMLCh Advice::TYPE_NAME[] = UNICODE_LITERAL_10(A,d,v,i,c,e,T,y,p,e);
1118 const XMLCh Assertion::LOCAL_NAME[] = UNICODE_LITERAL_9(A,s,s,e,r,t,i,o,n);
1119 const XMLCh Assertion::TYPE_NAME[] = UNICODE_LITERAL_13(A,s,s,e,r,t,i,o,n,T,y,p,e);
1120 const XMLCh Assertion::MINORVERSION_ATTRIB_NAME[] = UNICODE_LITERAL_12(M,i,n,o,r,V,e,r,s,i,o,n);
1121 const XMLCh Assertion::ASSERTIONID_ATTRIB_NAME[] = UNICODE_LITERAL_11(A,s,s,e,r,t,i,o,n,I,D);
1122 const XMLCh Assertion::ISSUER_ATTRIB_NAME[] = UNICODE_LITERAL_6(I,s,s,u,e,r);
1123 const XMLCh Assertion::ISSUEINSTANT_ATTRIB_NAME[] = UNICODE_LITERAL_12(I,s,s,u,e,I,n,s,t,a,n,t);
1124 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);
1125 const XMLCh Attribute::LOCAL_NAME[] = UNICODE_LITERAL_9(A,t,t,r,i,b,u,t,e);
1126 const XMLCh Attribute::TYPE_NAME[] = UNICODE_LITERAL_13(A,t,t,r,i,b,u,t,e,T,y,p,e);
1127 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);
1128 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);
1129 const XMLCh AttributeDesignator::ATTRIBUTENAME_ATTRIB_NAME[] = UNICODE_LITERAL_13(A,t,t,r,i,b,u,t,e,N,a,m,e);
1130 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);
1131 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);
1132 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);
1133 const XMLCh AttributeValue::LOCAL_NAME[] = UNICODE_LITERAL_14(A,t,t,r,i,b,u,t,e,V,a,l,u,e);
1134 const XMLCh Audience::LOCAL_NAME[] = UNICODE_LITERAL_8(A,u,d,i,e,n,c,e);
1135 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);
1136 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);
1137 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);
1138 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);
1139 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);
1140 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);
1141 const XMLCh AuthorityBinding::LOCAL_NAME[] = UNICODE_LITERAL_16(A,u,t,h,o,r,i,t,y,B,i,n,d,i,n,g);
1142 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);
1143 const XMLCh AuthorityBinding::AUTHORITYKIND_ATTRIB_NAME[] = UNICODE_LITERAL_13(A,u,t,h,o,r,i,t,y,K,i,n,d);
1144 const XMLCh AuthorityBinding::LOCATION_ATTRIB_NAME[] = UNICODE_LITERAL_8(L,o,c,a,t,i,o,n);
1145 const XMLCh AuthorityBinding::BINDING_ATTRIB_NAME[] = UNICODE_LITERAL_7(B,i,n,d,i,n,g);
1146 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);
1147 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);
1148 const XMLCh AuthorizationDecisionStatement::RESOURCE_ATTRIB_NAME[] = UNICODE_LITERAL_8(R,e,s,o,u,r,c,e);
1149 const XMLCh AuthorizationDecisionStatement::DECISION_ATTRIB_NAME[] = UNICODE_LITERAL_8(D,e,c,i,s,i,o,n);
1150 const XMLCh AuthorizationDecisionStatement::DECISION_PERMIT[] = UNICODE_LITERAL_6(P,e,r,m,i,t);
1151 const XMLCh AuthorizationDecisionStatement::DECISION_DENY[] = UNICODE_LITERAL_4(D,e,n,y);
1152 const XMLCh AuthorizationDecisionStatement::DECISION_INDETERMINATE[] = UNICODE_LITERAL_13(I,n,d,e,t,e,r,m,i,n,a,t,e);
1153 const XMLCh Condition::LOCAL_NAME[] = UNICODE_LITERAL_9(C,o,n,d,i,t,i,o,n);
1154 const XMLCh Conditions::LOCAL_NAME[] = UNICODE_LITERAL_10(C,o,n,d,i,t,i,o,n,s);
1155 const XMLCh Conditions::TYPE_NAME[] = UNICODE_LITERAL_14(C,o,n,d,i,t,i,o,n,s,T,y,p,e);
1156 const XMLCh Conditions::NOTBEFORE_ATTRIB_NAME[] = UNICODE_LITERAL_9(N,o,t,B,e,f,o,r,e);
1157 const XMLCh Conditions::NOTONORAFTER_ATTRIB_NAME[] =UNICODE_LITERAL_12(N,o,t,O,n,O,r,A,f,t,e,r);
1158 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);
1159 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);
1160 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);
1161 const XMLCh Evidence::LOCAL_NAME[] = UNICODE_LITERAL_8(E,v,i,d,e,n,c,e);
1162 const XMLCh Evidence::TYPE_NAME[] = UNICODE_LITERAL_12(E,v,i,d,e,n,c,e,T,y,p,e);
1163 const XMLCh NameIdentifier::LOCAL_NAME[] = UNICODE_LITERAL_14(N,a,m,e,I,d,e,n,t,i,f,i,e,r);
1164 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);
1165 const XMLCh NameIdentifier::NAMEQUALIFIER_ATTRIB_NAME[] = UNICODE_LITERAL_13(N,a,m,e,Q,u,a,l,i,f,i,e,r);
1166 const XMLCh NameIdentifier::FORMAT_ATTRIB_NAME[] = UNICODE_LITERAL_6(F,o,r,m,a,t);
1167 const XMLCh Statement::LOCAL_NAME[] = UNICODE_LITERAL_9(S,t,a,t,e,m,e,n,t);
1168 const XMLCh Subject::LOCAL_NAME[] = UNICODE_LITERAL_7(S,u,b,j,e,c,t);
1169 const XMLCh Subject::TYPE_NAME[] = UNICODE_LITERAL_11(S,u,b,j,e,c,t,T,y,p,e);
1170 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);
1171 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);
1172 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);
1173 const XMLCh SubjectLocality::LOCAL_NAME[] = UNICODE_LITERAL_15(S,u,b,j,e,c,t,L,o,c,a,l,i,t,y);
1174 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);
1175 const XMLCh SubjectLocality::IPADDRESS_ATTRIB_NAME[] = UNICODE_LITERAL_9(I,P,A,d,d,r,e,s,s);
1176 const XMLCh SubjectLocality::DNSADDRESS_ATTRIB_NAME[] = UNICODE_LITERAL_10(D,N,S,A,d,d,r,e,s,s);
1177 const XMLCh SubjectStatement::LOCAL_NAME[] = UNICODE_LITERAL_16(S,u,b,j,e,c,t,S,t,a,t,e,m,e,n,t);
1179 const XMLCh NameIdentifier::UNSPECIFIED[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified
1180 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1181 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1182 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1183 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1184 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1185 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
1188 const XMLCh NameIdentifier::EMAIL[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress
1189 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1190 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1191 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1192 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1193 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1194 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
1197 const XMLCh NameIdentifier::X509_SUBJECT[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName
1198 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1199 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1200 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1201 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1202 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1203 chLatin_X, chDigit_5, chDigit_0, chDigit_9, chLatin_S, chLatin_u, chLatin_b, chLatin_j, chLatin_e, chLatin_c, chLatin_t,
1204 chLatin_N, chLatin_a, chLatin_m, chLatin_e, chNull
1207 const XMLCh NameIdentifier::WIN_DOMAIN_QUALIFIED[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName
1208 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1209 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1210 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1211 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1212 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1213 chLatin_W, chLatin_i, chLatin_n, chLatin_d, chLatin_o, chLatin_w, chLatin_s,
1214 chLatin_D, chLatin_o, chLatin_m, chLatin_a, chLatin_i, chLatin_n,
1215 chLatin_Q, chLatin_u, chLatin_a, chLatin_l, chLatin_i, chLatin_f, chLatin_i, chLatin_e, chLatin_d,
1216 chLatin_N, chLatin_a, chLatin_m, chLatin_e, chNull
1219 const XMLCh SubjectConfirmation::ARTIFACT01[] = // urn:oasis:names:tc:SAML:1.0:cm:artifact-01
1220 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1221 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1222 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1223 chLatin_c, chLatin_m, chColon, chLatin_a, chLatin_r, chLatin_t, chLatin_i, chLatin_f, chLatin_a, chLatin_c, chLatin_t,
1224 chDash, chDigit_0, chDigit_1, chNull
1227 const XMLCh SubjectConfirmation::ARTIFACT[] = // urn:oasis:names:tc:SAML:1.0:cm:artifact
1228 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1229 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1230 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1231 chLatin_c, chLatin_m, chColon, chLatin_a, chLatin_r, chLatin_t, chLatin_i, chLatin_f, chLatin_a, chLatin_c, chLatin_t, chNull
1234 const XMLCh SubjectConfirmation::BEARER[] = // urn:oasis:names:tc:SAML:1.0:cm:bearer
1235 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1236 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1237 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1238 chLatin_c, chLatin_m, chColon, chLatin_b, chLatin_e, chLatin_a, chLatin_r, chLatin_e, chLatin_r, chNull
1241 const XMLCh SubjectConfirmation::HOLDER_KEY[] = // urn:oasis:names:tc:SAML:1.0:cm:holder-of-key
1242 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1243 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1244 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1245 chLatin_c, chLatin_m, chColon, chLatin_h, chLatin_o, chLatin_l, chLatin_d, chLatin_e, chLatin_r, chDash,
1246 chLatin_o, chLatin_f, chDash, chLatin_k, chLatin_e, chLatin_y, chNull
1249 const XMLCh SubjectConfirmation::SENDER_VOUCHES[] = // urn:oasis:names:tc:SAML:1.0:cm:sender-vouches
1250 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1251 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1252 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1253 chLatin_c, chLatin_m, chColon, chLatin_s, chLatin_e, chLatin_n, chLatin_d, chLatin_e, chLatin_r, chDash,
1254 chLatin_v, chLatin_o, chLatin_u, chLatin_c, chLatin_h, chLatin_e, chLatin_s, chNull
1257 const XMLCh Action::RWEDC_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:rwedc
1258 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1259 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1260 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1261 chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1262 chLatin_r, chLatin_w, chLatin_e, chLatin_d, chLatin_c, chNull
1265 const XMLCh Action::RWEDC_NEG_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:rwedc-negation
1266 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1267 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1268 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1269 chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1270 chLatin_r, chLatin_w, chLatin_e, chLatin_d, chLatin_c, chDash,
1271 chLatin_n, chLatin_e, chLatin_g, chLatin_a, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chNull
1274 const XMLCh Action::GHPP_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:ghpp
1275 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1276 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1277 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1278 chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1279 chLatin_g, chLatin_h, chLatin_p, chLatin_p, chNull
1282 const XMLCh Action::UNIX_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:unix
1283 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1284 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1285 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1286 chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1287 chLatin_u, chLatin_n, chLatin_i, chLatin_x, chNull