summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lasso/id-ff/session.c6
-rw-r--r--lasso/id-wsf-2.0/data_service.c5
-rw-r--r--lasso/id-wsf-2.0/discovery.c8
-rw-r--r--lasso/id-wsf-2.0/session.h2
-rw-r--r--lasso/id-wsf-2.0/wsf2_profile.c5
-rw-r--r--lasso/id-wsf-2.0/wsf2_profile.h2
6 files changed, 16 insertions, 12 deletions
diff --git a/lasso/id-ff/session.c b/lasso/id-ff/session.c
index 13697a31..4de6c822 100644
--- a/lasso/id-ff/session.c
+++ b/lasso/id-ff/session.c
@@ -346,7 +346,7 @@ lasso_session_get_endpoint_reference(LassoSession *session, const gchar *service
}
LassoSaml2Assertion*
-lasso_session_get_assertion_identity_token(LassoSession *session)
+lasso_session_get_assertion_identity_token(LassoSession *session, const gchar *service_type)
{
LassoWsAddrEndpointReference* epr;
GList *metadata_item;
@@ -359,8 +359,8 @@ lasso_session_get_assertion_identity_token(LassoSession *session)
return NULL;
}
- epr = lasso_session_get_endpoint_reference(session, LASSO_IDWSF2_DISCO_HREF);
- if (! LASSO_IS_WSA_ENDPOINT_REFERENCE(epr)) {
+ epr = lasso_session_get_endpoint_reference(session, service_type);
+ if (epr == NULL || epr->Metadata == NULL) {
return NULL;
}
diff --git a/lasso/id-wsf-2.0/data_service.c b/lasso/id-wsf-2.0/data_service.c
index 40e56631..72d324e3 100644
--- a/lasso/id-wsf-2.0/data_service.c
+++ b/lasso/id-wsf-2.0/data_service.c
@@ -66,7 +66,8 @@ lasso_idwsf2_data_service_init_query(LassoIdWsf2DataService *service)
profile->request = LASSO_NODE(query);
if (service == NULL || service->private_data == NULL
- || service->private_data->epr == NULL) {
+ || service->private_data->epr == NULL
+ || service->private_data->epr->Metadata == NULL) {
return LASSO_PROFILE_ERROR_MISSING_ENDPOINT_REFERENCE;
}
@@ -92,7 +93,7 @@ lasso_idwsf2_data_service_init_query(LassoIdWsf2DataService *service)
return LASSO_PROFILE_ERROR_MISSING_SERVICE_TYPE;
}
- lasso_wsf2_profile_init_soap_request(profile, LASSO_NODE(query));
+ lasso_wsf2_profile_init_soap_request(profile, LASSO_NODE(query), service_type);
/* Set msg_url as epr address, which is the SoapEndpoint */
if (epr->Address != NULL) {
diff --git a/lasso/id-wsf-2.0/discovery.c b/lasso/id-wsf-2.0/discovery.c
index ea742b6e..c3635bb4 100644
--- a/lasso/id-wsf-2.0/discovery.c
+++ b/lasso/id-wsf-2.0/discovery.c
@@ -145,7 +145,8 @@ lasso_idwsf2_discovery_init_metadata_register(LassoIdWsf2Discovery *discovery,
service_type, abstract, sp_provider_id, soap_endpoint);
/* Create a request with this xml node */
- lasso_wsf2_profile_init_soap_request(profile, LASSO_NODE(metadata_register));
+ lasso_wsf2_profile_init_soap_request(profile, LASSO_NODE(metadata_register),
+ LASSO_IDWSF2_DISCO_HREF);
/* FIXME : Get the url of the disco service where we must send the soap request */
/* profile->msg_url = g_strdup(disco_provider_id); */
@@ -266,7 +267,8 @@ lasso_idwsf2_discovery_init_metadata_association_add(LassoIdWsf2Discovery *disco
md_association_add->SvcMDID = g_list_append(md_association_add->SvcMDID, g_strdup(svcMDID));
/* Create a request with this xml node */
- lasso_wsf2_profile_init_soap_request(profile, LASSO_NODE(md_association_add));
+ lasso_wsf2_profile_init_soap_request(profile, LASSO_NODE(md_association_add),
+ LASSO_IDWSF2_DISCO_HREF);
epr = lasso_session_get_endpoint_reference(session, LASSO_IDWSF2_DISCO_HREF);
if (epr != NULL) {
@@ -414,7 +416,7 @@ lasso_idwsf2_discovery_init_query(LassoIdWsf2Discovery *discovery, const gchar *
}
profile->request = LASSO_NODE(lasso_idwsf2_disco_query_new());
- lasso_wsf2_profile_init_soap_request(profile, profile->request);
+ lasso_wsf2_profile_init_soap_request(profile, profile->request, LASSO_IDWSF2_DISCO_HREF);
epr = lasso_session_get_endpoint_reference(session, LASSO_IDWSF2_DISCO_HREF);
if (epr != NULL) {
diff --git a/lasso/id-wsf-2.0/session.h b/lasso/id-wsf-2.0/session.h
index d929443f..7d0fc35c 100644
--- a/lasso/id-wsf-2.0/session.h
+++ b/lasso/id-wsf-2.0/session.h
@@ -40,7 +40,7 @@ LASSO_EXPORT LassoWsAddrEndpointReference* lasso_session_get_endpoint_reference(
LassoSession *session, const gchar *service_type);
LASSO_EXPORT LassoSaml2Assertion* lasso_session_get_assertion_identity_token(
- LassoSession *session);
+ LassoSession *session, const gchar *service_type);
#ifdef __cplusplus
}
diff --git a/lasso/id-wsf-2.0/wsf2_profile.c b/lasso/id-wsf-2.0/wsf2_profile.c
index a1954f07..2a585012 100644
--- a/lasso/id-wsf-2.0/wsf2_profile.c
+++ b/lasso/id-wsf-2.0/wsf2_profile.c
@@ -205,7 +205,8 @@ lasso_wsf2_profile_set_session_from_dump(LassoWsf2Profile *profile, const gchar
gint
-lasso_wsf2_profile_init_soap_request(LassoWsf2Profile *profile, LassoNode *request)
+lasso_wsf2_profile_init_soap_request(LassoWsf2Profile *profile, LassoNode *request,
+ gchar *service_type)
{
LassoSoapEnvelope *envelope;
LassoSession *session = profile->session;
@@ -218,7 +219,7 @@ lasso_wsf2_profile_init_soap_request(LassoWsf2Profile *profile, LassoNode *reque
profile->soap_envelope_request = envelope;
/* Add identity token (if it exists in the session) in soap header */
- assertion = lasso_session_get_assertion_identity_token(session);
+ assertion = lasso_session_get_assertion_identity_token(session, service_type);
if (assertion != NULL) {
wsse_security = lasso_wsse_200401_security_new();
diff --git a/lasso/id-wsf-2.0/wsf2_profile.h b/lasso/id-wsf-2.0/wsf2_profile.h
index 4e59cef1..da899569 100644
--- a/lasso/id-wsf-2.0/wsf2_profile.h
+++ b/lasso/id-wsf-2.0/wsf2_profile.h
@@ -92,7 +92,7 @@ LASSO_EXPORT gint lasso_wsf2_profile_set_session_from_dump(LassoWsf2Profile *pro
const gchar *dump);
LASSO_EXPORT gint lasso_wsf2_profile_init_soap_request(LassoWsf2Profile *profile,
- LassoNode *request);
+ LassoNode *request, gchar *service_type);
LASSO_EXPORT gint lasso_wsf2_profile_build_request_msg(LassoWsf2Profile *profile);