BEGIN_XMLOBJECT(SAML_API,NameIDPolicy,xmltooling::XMLObject,SAML 2.0 NameIDPolicy element);
DECL_STRING_ATTRIB(Format,FORMAT);
DECL_STRING_ATTRIB(SPNameQualifier,SPNAMEQUALIFIER);
- DECL_BOOLEAN_ATTRIB(AllowCreate,ALLOWCREATE);
+ DECL_BOOLEAN_ATTRIB(AllowCreate,ALLOWCREATE,false);
/** NameIDPolicyType local name */
static const XMLCh TYPE_NAME[];
END_XMLOBJECT;
END_XMLOBJECT;
BEGIN_XMLOBJECT(SAML_API,AuthnRequest,Request,SAML 2.0 AuthnRequest element);
- DECL_BOOLEAN_ATTRIB(ForceAuthn,FORCEAUTHN);
- DECL_BOOLEAN_ATTRIB(IsPassive,ISPASSIVE);
+ DECL_BOOLEAN_ATTRIB(ForceAuthn,FORCEAUTHN,false);
+ DECL_BOOLEAN_ATTRIB(IsPassive,ISPASSIVE,false);
DECL_STRING_ATTRIB(ProtocolBinding,PROTOCOLBINDING);
DECL_INTEGER_ATTRIB(AssertionConsumerServiceIndex,ASSERTIONCONSUMERSERVICEINDEX);
DECL_STRING_ATTRIB(AssertionConsumerServiceURL,ASSERTIONCONSUMERSERVICEURL);
BEGIN_XMLOBJECT(SAML_API,IndexedEndpointType,EndpointType,SAML 2.0 IndexedEndpointType type);
DECL_INTEGER_ATTRIB(Index,INDEX);
- DECL_BOOLEAN_ATTRIB(isDefault,ISDEFAULT);
+ DECL_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,false);
/** IndexedEndpointType local name */
static const XMLCh TYPE_NAME[];
END_XMLOBJECT;
END_XMLOBJECT;
BEGIN_XMLOBJECT(SAML_API,IDPSSODescriptor,SSODescriptorType,SAML 2.0 IDPSSODescriptor element);
- DECL_BOOLEAN_ATTRIB(WantAuthnRequestsSigned,WANTAUTHNREQUESTSSIGNED);
+ DECL_BOOLEAN_ATTRIB(WantAuthnRequestsSigned,WANTAUTHNREQUESTSSIGNED,false);
DECL_TYPED_CHILDREN(SingleSignOnService);
DECL_TYPED_CHILDREN(NameIDMappingService);
DECL_TYPED_CHILDREN(AssertionIDRequestService);
END_XMLOBJECT;
BEGIN_XMLOBJECT(SAML_API,RequestedAttribute,saml2::Attribute,SAML 2.0 RequestedAttribute element);
- DECL_BOOLEAN_ATTRIB(isRequired,ISREQUIRED);
+ DECL_BOOLEAN_ATTRIB(isRequired,ISREQUIRED,false);
/** RequestedAttributeType local name */
static const XMLCh TYPE_NAME[];
END_XMLOBJECT;
BEGIN_XMLOBJECT(SAML_API,AttributeConsumingService,xmltooling::XMLObject,SAML 2.0 AttributeConsumingService element);
DECL_INTEGER_ATTRIB(Index,INDEX);
- DECL_BOOLEAN_ATTRIB(isDefault,ISDEFAULT);
+ DECL_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,false);
DECL_TYPED_CHILDREN(ServiceName);
DECL_TYPED_CHILDREN(ServiceDescription);
DECL_TYPED_CHILDREN(RequestedAttribute);
END_XMLOBJECT;
BEGIN_XMLOBJECT(SAML_API,SPSSODescriptor,SSODescriptorType,SAML 2.0 SPSSODescriptor element);
- DECL_BOOLEAN_ATTRIB(AuthnRequestsSigned,AUTHNREQUESTSSIGNED);
- DECL_BOOLEAN_ATTRIB(WantAssertionsSigned,WANTASSERTIONSSIGNED);
+ DECL_BOOLEAN_ATTRIB(AuthnRequestsSigned,AUTHNREQUESTSSIGNED,false);
+ DECL_BOOLEAN_ATTRIB(WantAssertionsSigned,WANTASSERTIONSSIGNED,false);
DECL_TYPED_CHILDREN(AssertionConsumerService);
DECL_TYPED_CHILDREN(AttributeConsumingService);
/** SPSSODescriptorType local name */
END_XMLOBJECT;
BEGIN_XMLOBJECT(SAML_API,QueryDescriptorType,RoleDescriptor,SAML 2.0 QueryDescriptorType abstract type);
- DECL_BOOLEAN_ATTRIB(WantAssertionsSigned,WANTASSERTIONSSIGNED);
+ DECL_BOOLEAN_ATTRIB(WantAssertionsSigned,WANTASSERTIONSSIGNED,false);
DECL_TYPED_CHILDREN(NameIDFormat);
/** QueryDescriptorType local name */
static const XMLCh TYPE_NAME[];
assertEquals("ID attribute", expectedID, request->getID());\r
assertEquals("Version attribute", expectedVersion, request->getVersion());\r
TSM_ASSERT_EQUALS("IssueInstant attribute", expectedIssueInstant->getEpoch(), request->getIssueInstant()->getEpoch());\r
- TSM_ASSERT_EQUALS("ForceAuthn attribute presence", false, request->ForceAuthn().first);\r
- TSM_ASSERT_EQUALS("IsPassive attribute presence", false, request->IsPassive().first);\r
+ TSM_ASSERT_EQUALS("ForceAuthn attribute presence", XMLConstants::XML_BOOL_NULL, request->getForceAuthn());\r
+ TSM_ASSERT_EQUALS("IsPassive attribute presence", XMLConstants::XML_BOOL_NULL, request->getIsPassive());\r
TSM_ASSERT_EQUALS("AssertionConsumerServiceIndex attribute presence",false, request->getAssertionConsumerServiceIndex().first);\r
TSM_ASSERT_EQUALS("AttributeConsumingServiceIndex attribute presence", false, request->getAttributeConsumingServiceIndex().first);\r
\r
\r
assertEquals("Consent attribute", expectedConsent, request->getConsent());\r
assertEquals("Destination attribute", expectedDestination, request->getDestination());\r
- TSM_ASSERT_EQUALS("ForceAuthn attribute presence", true, request->ForceAuthn().first);\r
- TSM_ASSERT_EQUALS("ForceAuthn attribute value", expectedForceAuthn, request->ForceAuthn().second);\r
- TSM_ASSERT_EQUALS("IsPassive attribute presence", true, request->IsPassive().first);\r
- TSM_ASSERT_EQUALS("IsPassive attribute value", expectedIsPassive, request->IsPassive().second);\r
+ TSM_ASSERT_EQUALS("ForceAuthn attribute value", expectedForceAuthn, request->ForceAuthn());\r
+ TSM_ASSERT_EQUALS("IsPassive attribute value", expectedIsPassive, request->IsPassive());\r
assertEquals("ProtocolBinding attribute", expectedProtocolBinding,request->getProtocolBinding());\r
TSM_ASSERT_EQUALS("AssertionConsumerServiceIndex attribute presence",true, request->getAssertionConsumerServiceIndex().first);\r
TSM_ASSERT_EQUALS("AssertionConsumerServiceIndex attribute value",expectedAssertionConsumerServiceIndex, request->getAssertionConsumerServiceIndex().second);\r
TS_ASSERT(request->getConditions()!=NULL);\r
TS_ASSERT(request->getRequestedAuthnContext()!=NULL);\r
TS_ASSERT(request->getScoping()!=NULL);\r
- TSM_ASSERT_EQUALS("ForceAuthn attribute presence", false, request->ForceAuthn().first);\r
- TSM_ASSERT_EQUALS("IsPassive attribute presence", false, request->IsPassive().first);\r
+ TSM_ASSERT_EQUALS("ForceAuthn attribute presence", XMLConstants::XML_BOOL_NULL, request->getForceAuthn());\r
+ TSM_ASSERT_EQUALS("IsPassive attribute presence", XMLConstants::XML_BOOL_NULL, request->getIsPassive());\r
TSM_ASSERT_EQUALS("AssertionConsumerServiceIndex attribute presence",false, request->getAssertionConsumerServiceIndex().first);\r
TSM_ASSERT_EQUALS("AttributeConsumingServiceIndex attribute presence", false, request->getAttributeConsumingServiceIndex().first);\r
}\r
auto_ptr<XMLObject> xo(unmarshallElement(singleElementFile));\r
NameIDPolicy* policy = dynamic_cast<NameIDPolicy*>(xo.get());\r
TS_ASSERT(policy!=NULL);\r
- TSM_ASSERT_EQUALS("AllowCreate attribute presence", false, policy->AllowCreate().first);\r
+ TSM_ASSERT_EQUALS("AllowCreate attribute presence", XMLConstants::XML_BOOL_NULL, policy->getAllowCreate());\r
}\r
\r
void testSingleElementOptionalAttributesUnmarshall() {\r
TS_ASSERT(policy!=NULL);\r
assertEquals("Format attribute", expectedFormat, policy->getFormat());\r
assertEquals("SPNameQualifier attribute", expectedSPNameQualifier, policy->getSPNameQualifier());\r
- TSM_ASSERT_EQUALS("AllowCreate attribute presence", true, policy->AllowCreate().first);\r
- TSM_ASSERT_EQUALS("AllowCreate attribute value", expectedAllowCreate, policy->AllowCreate().second);\r
+ TSM_ASSERT_DIFFERS("AllowCreate attribute presence", XMLConstants::XML_BOOL_NULL, policy->getAllowCreate());\r
+ TSM_ASSERT_EQUALS("AllowCreate attribute value", expectedAllowCreate, policy->AllowCreate());\r
}\r
\r
void testSingleElementMarshall() {\r