summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrederic Peters <fpeters@entrouvert.com>2005-01-08 15:52:30 +0000
committerFrederic Peters <fpeters@entrouvert.com>2005-01-08 15:52:30 +0000
commitbfcb490be39511c5357638e121e96e49bd6dfd6b (patch)
tree4a044d9c2e1de1e4bf77717f26d064bbd2ebe584
parenta110f6284980d31d09a59ede113ddeb41c8a2396 (diff)
downloadlasso-bfcb490be39511c5357638e121e96e49bd6dfd6b.tar.gz
lasso-bfcb490be39511c5357638e121e96e49bd6dfd6b.tar.xz
lasso-bfcb490be39511c5357638e121e96e49bd6dfd6b.zip
turned a bunch of unbounded elements into GList*
-rw-r--r--lasso/xml/lib_assertion.c3
-rw-r--r--lasso/xml/lib_authentication_statement.c3
-rw-r--r--lasso/xml/lib_authn_context.h2
-rw-r--r--lasso/xml/lib_authn_request.h4
-rw-r--r--lasso/xml/lib_authn_response_envelope.h2
-rw-r--r--lasso/xml/lib_request_authn_context.c4
-rw-r--r--lasso/xml/lib_request_authn_context.h6
-rw-r--r--lasso/xml/saml_advice.c2
-rw-r--r--lasso/xml/saml_advice.h3
-rw-r--r--lasso/xml/saml_audience_restriction_condition.c24
-rw-r--r--lasso/xml/saml_audience_restriction_condition.h4
-rw-r--r--lasso/xml/saml_authentication_statement.c2
-rw-r--r--lasso/xml/saml_authentication_statement.h2
-rw-r--r--lasso/xml/saml_subject_confirmation.c2
-rw-r--r--lasso/xml/saml_subject_confirmation.h2
15 files changed, 44 insertions, 21 deletions
diff --git a/lasso/xml/lib_assertion.c b/lasso/xml/lib_assertion.c
index 248795d0..3b362888 100644
--- a/lasso/xml/lib_assertion.c
+++ b/lasso/xml/lib_assertion.c
@@ -154,8 +154,7 @@ lasso_lib_assertion_new_full(const char *issuer, const char *requestID,
assertion->Conditions->NotOnOrAfter = g_strdup(notOnOrAfter);
if (audience) {
assertion->Conditions->AudienceRestrictionCondition =
- lasso_saml_audience_restriction_condition_new();
- assertion->Conditions->AudienceRestrictionCondition->Audience = g_strdup(audience);
+ lasso_saml_audience_restriction_condition_new_full(audience);
}
return LASSO_LIB_ASSERTION(assertion);
diff --git a/lasso/xml/lib_authentication_statement.c b/lasso/xml/lib_authentication_statement.c
index 6f7f46ee..1079abd3 100644
--- a/lasso/xml/lib_authentication_statement.c
+++ b/lasso/xml/lib_authentication_statement.c
@@ -180,7 +180,8 @@ lasso_lib_authentication_statement_new_full(const char *authenticationMethod,
/* SubjectConfirmation & Subject */
subject_confirmation = lasso_saml_subject_confirmation_new();
- subject_confirmation->ConfirmationMethod = g_strdup(LASSO_SAML_CONFIRMATION_METHOD_BEARER);
+ subject_confirmation->ConfirmationMethod = g_list_append(NULL,
+ g_strdup(LASSO_SAML_CONFIRMATION_METHOD_BEARER));
LASSO_SAML_SUBJECT(subject)->SubjectConfirmation = subject_confirmation;
LASSO_SAML_SUBJECT_STATEMENT_ABSTRACT(statement)->Subject = LASSO_SAML_SUBJECT(subject);
diff --git a/lasso/xml/lib_authn_context.h b/lasso/xml/lib_authn_context.h
index 79e5066b..a86d4bb5 100644
--- a/lasso/xml/lib_authn_context.h
+++ b/lasso/xml/lib_authn_context.h
@@ -56,7 +56,7 @@ struct _LassoLibAuthnContext {
/* <xs:element name="AuthnContextStatementRef" type="xs:anyURI"/> */
char *AuthnContextStatementRef;
/* <xs:element ref="ac:AuthenticationContextStatement"/> */
- /* XXX: LassoLibAuthenticationContextStatement ... */
+ void *AuthenticationContextStatement; /* TODO: support that element */
};
struct _LassoLibAuthnContextClass {
diff --git a/lasso/xml/lib_authn_request.h b/lasso/xml/lib_authn_request.h
index 064e0796..e4d378b4 100644
--- a/lasso/xml/lib_authn_request.h
+++ b/lasso/xml/lib_authn_request.h
@@ -60,13 +60,13 @@ struct _LassoLibAuthnRequest {
/* <xs:element ref="AffiliationID" minOccurs="0"/> */
char *AffiliationID;
/* <xs:element ref="NameIDPolicy" minOccurs="0"/> */
- char *NameIDPolicy; /* XXX: move to enum ?*/
+ char *NameIDPolicy;
/* <xs:element name="ForceAuthn" type="xs:boolean" minOccurs="0"/> */
gboolean ForceAuthn;
/* <xs:element name="IsPassive" type="xs:boolean "minOccurs="0"/> */
gboolean IsPassive;
/* <xs:element ref="ProtocolProfile" minOccurs="0"/> */
- char *ProtocolProfile; /* XXX: move to enum */
+ char *ProtocolProfile;
/* <xs:element name="AssertionConsumerServiceID" type="xs:string" minOccurs="0"/> */
char *AssertionConsumerServiceID;
/* <xs:element ref="RequestAuthnContext" minOccurs="0"/> */
diff --git a/lasso/xml/lib_authn_response_envelope.h b/lasso/xml/lib_authn_response_envelope.h
index bb24b659..c9355111 100644
--- a/lasso/xml/lib_authn_response_envelope.h
+++ b/lasso/xml/lib_authn_response_envelope.h
@@ -53,7 +53,7 @@ struct _LassoLibAuthnResponseEnvelope {
LassoNode parent;
/*< public >*/
- LassoNode *Extension; /* XXX */
+ GList *Extension;
LassoLibAuthnResponse *AuthnResponse;
char *AssertionConsumerServiceURL;
};
diff --git a/lasso/xml/lib_request_authn_context.c b/lasso/xml/lib_request_authn_context.c
index 05ae41ec..2e1a3be0 100644
--- a/lasso/xml/lib_request_authn_context.c
+++ b/lasso/xml/lib_request_authn_context.c
@@ -50,9 +50,9 @@
/*****************************************************************************/
static struct XmlSnippet schema_snippets[] = {
- { "AuthnContextClassRef", SNIPPET_CONTENT,
+ { "AuthnContextClassRef", SNIPPET_LIST_CONTENT,
G_STRUCT_OFFSET(LassoLibRequestAuthnContext, AuthnContextClassRef) },
- { "AuthnContextStatementRef", SNIPPET_CONTENT,
+ { "AuthnContextStatementRef", SNIPPET_LIST_CONTENT,
G_STRUCT_OFFSET(LassoLibRequestAuthnContext, AuthnContextStatementRef) },
{ "AuthnContextComparisonType", SNIPPET_CONTENT,
G_STRUCT_OFFSET(LassoLibRequestAuthnContext, AuthnContextComparisonType) },
diff --git a/lasso/xml/lib_request_authn_context.h b/lasso/xml/lib_request_authn_context.h
index 40826320..ed1dd412 100644
--- a/lasso/xml/lib_request_authn_context.h
+++ b/lasso/xml/lib_request_authn_context.h
@@ -55,12 +55,12 @@ struct _LassoLibRequestAuthnContext {
/*< public >*/
/* <xs:element name="AuthnContextClassRef" type="xs:anyURI" maxOccurs="unbounded"/> */
- char *AuthnContextClassRef; /* XXX: should actually be a list */
+ GList *AuthnContextClassRef;
/* <xs:element name="AuthnContextStatementRef" type="xs:anyURI" maxOccurs="unbounded"/> */
- char *AuthnContextStatementRef; /* XXX: idem */
+ GList *AuthnContextStatementRef;
/* <xs:element name="AuthnContextComparison" type="AuthnContextComparisonType"
* minOccurs="0"/> */
- char *AuthnContextComparisonType; /* XXX should be enum ? */
+ char *AuthnContextComparisonType;
};
struct _LassoLibRequestAuthnContextClass {
diff --git a/lasso/xml/saml_advice.c b/lasso/xml/saml_advice.c
index 00878af0..e3e39c08 100644
--- a/lasso/xml/saml_advice.c
+++ b/lasso/xml/saml_advice.c
@@ -49,7 +49,7 @@
/*****************************************************************************/
static struct XmlSnippet schema_snippets[] = {
- { "AssertionIDReference", SNIPPET_CONTENT,
+ { "AssertionIDReference", SNIPPET_LIST_CONTENT,
G_STRUCT_OFFSET(LassoSamlAdvice, AssertionIDReference) },
{ "Assertion", SNIPPET_NODE, G_STRUCT_OFFSET(LassoSamlAdvice, Assertion) },
{ NULL, 0, 0}
diff --git a/lasso/xml/saml_advice.h b/lasso/xml/saml_advice.h
index d013fd31..f6dc67fd 100644
--- a/lasso/xml/saml_advice.h
+++ b/lasso/xml/saml_advice.h
@@ -50,9 +50,8 @@ struct _LassoSamlAdvice {
LassoNode parent;
/*< public >*/
- /* XXX: unbounded; both should be GList */
/* <element ref="saml:AssertionIDReference"/> */
- char *AssertionIDReference;
+ GList *AssertionIDReference;
/* <element ref="saml:Assertion"/> */
LassoNode *Assertion; /* actually LassoSamlAssertion* but it recurses */
};
diff --git a/lasso/xml/saml_audience_restriction_condition.c b/lasso/xml/saml_audience_restriction_condition.c
index 8e6d9333..c027566f 100644
--- a/lasso/xml/saml_audience_restriction_condition.c
+++ b/lasso/xml/saml_audience_restriction_condition.c
@@ -47,7 +47,7 @@
/*****************************************************************************/
static struct XmlSnippet schema_snippets[] = {
- { "Audience", SNIPPET_CONTENT,
+ { "Audience", SNIPPET_LIST_CONTENT,
G_STRUCT_OFFSET(LassoSamlAudienceRestrictionCondition, Audience) },
{ NULL, 0, 0 }
};
@@ -109,3 +109,25 @@ lasso_saml_audience_restriction_condition_new()
{
return g_object_new(LASSO_TYPE_SAML_AUDIENCE_RESTRICTION_CONDITION, NULL);
}
+
+
+/**
+ * lasso_saml_audience_restriction_condition_new_full:
+ * @audience:
+ *
+ * Creates a new #LassoSamlAudienceRestrictionCondition object and initializes
+ * it with the parameters.
+ *
+ * Return value: a newly created #LassoSamlAudienceRestrictionCondition
+ **/
+LassoSamlAudienceRestrictionCondition*
+lasso_saml_audience_restriction_condition_new_full(const char *audience)
+{
+ LassoSamlAudienceRestrictionCondition *condition;
+
+ condition = lasso_saml_audience_restriction_condition_new();
+ if (audience != NULL) {
+ condition->Audience = g_list_append(condition->Audience, g_strdup(audience));
+ }
+ return condition;
+}
diff --git a/lasso/xml/saml_audience_restriction_condition.h b/lasso/xml/saml_audience_restriction_condition.h
index 03563dd5..1b0e11a8 100644
--- a/lasso/xml/saml_audience_restriction_condition.h
+++ b/lasso/xml/saml_audience_restriction_condition.h
@@ -57,7 +57,7 @@ struct _LassoSamlAudienceRestrictionCondition {
/*< public >*/
/* <element ref="saml:Audience" maxOccurs="unbounded"/> */
- char *Audience; /* XXX: unbounded -> GList */
+ GList *Audience;
};
struct _LassoSamlAudienceRestrictionConditionClass {
@@ -67,6 +67,8 @@ struct _LassoSamlAudienceRestrictionConditionClass {
LASSO_EXPORT GType lasso_saml_audience_restriction_condition_get_type(void);
LASSO_EXPORT LassoSamlAudienceRestrictionCondition*
lasso_saml_audience_restriction_condition_new(void);
+LASSO_EXPORT LassoSamlAudienceRestrictionCondition*
+ lasso_saml_audience_restriction_condition_new_full(const char *audience);
#ifdef __cplusplus
}
diff --git a/lasso/xml/saml_authentication_statement.c b/lasso/xml/saml_authentication_statement.c
index 0587241d..76842e26 100644
--- a/lasso/xml/saml_authentication_statement.c
+++ b/lasso/xml/saml_authentication_statement.c
@@ -50,7 +50,7 @@
static struct XmlSnippet schema_snippets[] = {
{ "SubjectLocality", SNIPPET_NODE,
G_STRUCT_OFFSET(LassoSamlAuthenticationStatement, SubjectLocality) },
- { "AuthorityBinding", SNIPPET_NODE,
+ { "AuthorityBinding", SNIPPET_LIST_NODES,
G_STRUCT_OFFSET(LassoSamlAuthenticationStatement, AuthorityBinding) },
{ "AuthenticationMethod", SNIPPET_ATTRIBUTE,
G_STRUCT_OFFSET(LassoSamlAuthenticationStatement, AuthenticationMethod) },
diff --git a/lasso/xml/saml_authentication_statement.h b/lasso/xml/saml_authentication_statement.h
index adcacb6c..494370dd 100644
--- a/lasso/xml/saml_authentication_statement.h
+++ b/lasso/xml/saml_authentication_statement.h
@@ -59,7 +59,7 @@ struct _LassoSamlAuthenticationStatement {
/* <element ref="saml:SubjectLocality" minOccurs="0"/> */
LassoSamlSubjectLocality *SubjectLocality;
/* <element ref="saml:AuthorityBinding" minOccurs="0" maxOccurs="unbounded"/> */
- LassoSamlAuthorityBinding *AuthorityBinding; /* XXX unbounded */
+ GList *AuthorityBinding;
/* <attribute name="AuthenticationMethod" type="anyURI" use="required"/> */
char *AuthenticationMethod;
/* <attribute name="AuthenticationInstant" type="dateTime" use="required"/> */
diff --git a/lasso/xml/saml_subject_confirmation.c b/lasso/xml/saml_subject_confirmation.c
index fd9612b8..043f8781 100644
--- a/lasso/xml/saml_subject_confirmation.c
+++ b/lasso/xml/saml_subject_confirmation.c
@@ -46,7 +46,7 @@
/*****************************************************************************/
static struct XmlSnippet schema_snippets[] = {
- { "ConfirmationMethod", SNIPPET_CONTENT,
+ { "ConfirmationMethod", SNIPPET_LIST_CONTENT,
G_STRUCT_OFFSET(LassoSamlSubjectConfirmation, ConfirmationMethod) },
{ "SubjectConfirmationData", SNIPPET_CONTENT,
G_STRUCT_OFFSET(LassoSamlSubjectConfirmation, SubjectConfirmationData) },
diff --git a/lasso/xml/saml_subject_confirmation.h b/lasso/xml/saml_subject_confirmation.h
index adc5ab8a..3bc13d3e 100644
--- a/lasso/xml/saml_subject_confirmation.h
+++ b/lasso/xml/saml_subject_confirmation.h
@@ -55,7 +55,7 @@ struct _LassoSamlSubjectConfirmation {
/*< public >*/
/* <element ref="saml:ConfirmationMethod" maxOccurs="unbounded"/> */
- char *ConfirmationMethod; /* XXX: unbounded and should be enum */
+ GList *ConfirmationMethod;
/* <element ref="saml:SubjectConfirmationData" minOccurs="0"/> */
char *SubjectConfirmationData;
};