summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Clapies <nclapies@entrouvert.com>2005-05-10 16:47:15 +0000
committerNicolas Clapies <nclapies@entrouvert.com>2005-05-10 16:47:15 +0000
commit2fe3f065d70fcbcf5f4d8cd13cf6ab8cd45a1933 (patch)
tree53196fde195e76105c519d93ef325a23135e1041
parent71af2a442f28d4ce18a294179f01f5ab83fbfed9 (diff)
downloadlasso-2fe3f065d70fcbcf5f4d8cd13cf6ab8cd45a1933.tar.gz
lasso-2fe3f065d70fcbcf5f4d8cd13cf6ab8cd45a1933.tar.xz
lasso-2fe3f065d70fcbcf5f4d8cd13cf6ab8cd45a1933.zip
Fixed lecp profile : added case when lecp profile is used when building assertion.
-rw-r--r--lasso/id-ff/login.c6
-rw-r--r--lasso/id-ff/login.h1
-rw-r--r--lasso/xml/strings.h8
-rw-r--r--swig/Lasso-wsf.i121
-rw-r--r--swig/Lasso.i4
5 files changed, 105 insertions, 35 deletions
diff --git a/lasso/id-ff/login.c b/lasso/id-ff/login.c
index 163b54cc..4b541ade 100644
--- a/lasso/id-ff/login.c
+++ b/lasso/id-ff/login.c
@@ -255,7 +255,8 @@ lasso_login_build_assertion(LassoLogin *login,
assertion->private_key_file = g_strdup(profile->server->private_key);
assertion->certificate_file = g_strdup(profile->server->certificate);
- if (login->protocolProfile == LASSO_LOGIN_PROTOCOL_PROFILE_BRWS_POST) {
+ if (login->protocolProfile == LASSO_LOGIN_PROTOCOL_PROFILE_BRWS_POST || \
+ login->protocolProfile == LASSO_LOGIN_PROTOCOL_PROFILE_BRWS_LECP) {
/* only add assertion if response is an AuthnResponse */
LASSO_SAMLP_RESPONSE(profile->response)->Assertion = g_list_append(NULL, assertion);
}
@@ -1361,6 +1362,9 @@ lasso_login_process_authn_request_msg(LassoLogin *login, const char *authn_reque
} else if (strcmp(protocolProfile, LASSO_LIB_PROTOCOL_PROFILE_BRWS_POST) == 0) {
protocolProfile = LASSO_LIB_PROTOCOL_PROFILE_BRWS_POST;
login->protocolProfile = LASSO_LOGIN_PROTOCOL_PROFILE_BRWS_POST;
+ } else if (strcmp(protocolProfile, LASSO_LIB_PROTOCOL_PROFILE_BRWS_LECP) == 0) {
+ protocolProfile = LASSO_LIB_PROTOCOL_PROFILE_BRWS_LECP;
+ login->protocolProfile = LASSO_LOGIN_PROTOCOL_PROFILE_BRWS_LECP;
} else {
return critical_error(LASSO_PROFILE_ERROR_INVALID_PROTOCOLPROFILE);
}
diff --git a/lasso/id-ff/login.h b/lasso/id-ff/login.h
index 783e3429..263e94be 100644
--- a/lasso/id-ff/login.h
+++ b/lasso/id-ff/login.h
@@ -62,6 +62,7 @@ typedef struct _LassoLoginPrivate LassoLoginPrivate;
typedef enum {
LASSO_LOGIN_PROTOCOL_PROFILE_BRWS_ART = 1,
LASSO_LOGIN_PROTOCOL_PROFILE_BRWS_POST,
+ LASSO_LOGIN_PROTOCOL_PROFILE_BRWS_LECP,
} LassoLoginProtocolProfile;
struct _LassoLogin {
diff --git a/lasso/xml/strings.h b/lasso/xml/strings.h
index b393b4d7..3e075029 100644
--- a/lasso/xml/strings.h
+++ b/lasso/xml/strings.h
@@ -104,6 +104,8 @@
"http://projectliberty.org/profiles/brws-art"
#define LASSO_LIB_PROTOCOL_PROFILE_BRWS_POST \
"http://projectliberty.org/profiles/brws-post"
+#define LASSO_LIB_PROTOCOL_PROFILE_BRWS_LECP \
+ "http://projectliberty.org/profiles/lecp"
#define LASSO_LIB_PROTOCOL_PROFILE_FED_TERM_IDP_HTTP \
"http://projectliberty.org/profiles/fedterm-idp-http"
#define LASSO_LIB_PROTOCOL_PROFILE_FED_TERM_IDP_SOAP \
@@ -281,13 +283,13 @@
/*****************************************************************************/
#define LASSO_SOAP_ENV_HREF "http://schemas.xmlsoap.org/soap/envelope/"
-#define LASSO_SOAP_ENV_PREFIX "soap-env"
+#define LASSO_SOAP_ENV_PREFIX "s"
#define LASSO_SOAP_BINDING_HREF "urn:liberty:sb:2003-08"
-#define LASSO_SOAP_BINDING_PREFIX "soap-binding"
+#define LASSO_SOAP_BINDING_PREFIX "sb"
#define LASSO_SOAP_BINDING_EXT_HREF "urn:liberty:sb:2004-04"
-#define LASSO_SOAP_BINDING_EXT_PREFIX "soap-binding-ext"
+#define LASSO_SOAP_BINDING_EXT_PREFIX "sbe"
#define LASSO_WSSE_HREF "http://schemas.xmlsoap.org/ws/2002/07/secext"
#define LASSO_WSSE_PREFIX "wsse"
diff --git a/swig/Lasso-wsf.i b/swig/Lasso-wsf.i
index 4e7ca6a7..f4dd3d45 100644
--- a/swig/Lasso-wsf.i
+++ b/swig/Lasso-wsf.i
@@ -3554,13 +3554,8 @@ typedef struct {
/* Implementations of methods inherited from WsfProfile */
-gint LassoDiscovery_buildRequestMsg(LassoDiscovery *self) {
- return lasso_wsf_profile_build_request_msg(LASSO_WSF_PROFILE(self));
-}
-
-gint LassoDiscovery_buildResponseMsg(LassoDiscovery *self) {
- return lasso_wsf_profile_build_response_msg(LASSO_WSF_PROFILE(self));
-}
+#define LassoDiscovery_buildRequestMsg(self) lasso_wsf_profile_build_soap_request_msg(LASSO_WSF_PROFILE(self))
+#define LassoDiscovery_buildResponseMsg(self) lasso_wsf_profile_build_soap_response_msg(LASSO_WSF_PROFILE(self))
/* Methods implementations */
@@ -3682,14 +3677,8 @@ typedef struct {
#define LassoInteractionProfileService_dump(self) lasso_node_dump(LASSO_NODE(self))
/* Implementations of methods inherited from WsfProfile */
-
-gint LassoInteractionProfileService_buildRequestMsg(LassoInteractionProfileService *self) {
- return lasso_wsf_profile_build_request_msg(LASSO_WSF_PROFILE(self));
-}
-
-gint LassoInteractionProfileService_buildResponseMsg(LassoInteractionProfileService *self) {
- return lasso_wsf_profile_build_response_msg(LASSO_WSF_PROFILE(self));
-}
+#define LassoInteractionProfileService_buildRequestMsg(self) lasso_wsf_profile_build_soap_request_msg(LASSO_WSF_PROFILE(self))
+#define LassoInteractionProfileService_buildResponseMsg(self) lasso_wsf_profile_build_soap_response_msg(LASSO_WSF_PROFILE(self))
/* Methods implementations */
@@ -3829,14 +3818,8 @@ typedef struct {
/* Implementations of methods inherited from WsfProfile */
-
-gint LassoProfileService_buildRequestMsg(LassoProfileService *self) {
- return lasso_wsf_profile_build_request_msg(LASSO_WSF_PROFILE(self));
-}
-
-gint LassoProfileService_buildResponseMsg(LassoProfileService *self) {
- return lasso_wsf_profile_build_response_msg(LASSO_WSF_PROFILE(self));
-}
+#define LassoProfileService_buildRequestMsg(self) lasso_wsf_profile_build_soap_request_msg(LASSO_WSF_PROFILE(self))
+#define LassoProfileService_buildResponseMsg(self) lasso_wsf_profile_build_soap_request_msg(LASSO_WSF_PROFILE(self))
/* Methods implementations */
#define LassoProfileService_addData lasso_profile_service_add_data
@@ -3989,14 +3972,8 @@ typedef struct {
#define delete_LassoAuthentication(self) lasso_node_destroy(LASSO_NODE(self))
/* Implementations of methods inherited from WsfProfile */
-
-gint LassoAuthentication_buildRequestMsg(LassoAuthentication *self) {
- return lasso_wsf_profile_build_request_msg(LASSO_WSF_PROFILE(self));
-}
-
-gint LassoAuthentication_buildResponseMsg(LassoAuthentication *self) {
- return lasso_wsf_profile_build_response_msg(LASSO_WSF_PROFILE(self));
-}
+#define LassoAuthentication_buildRequestMsg(self) lasso_wsf_profile_build_soap_request_msg(LASSO_WSF_PROFILE(self))
+#define LassoAuthentication_buildResponseMsg(self) lasso_wsf_profile_build_soap_response_msg(LASSO_WSF_PROFILE(self))
/* Methods implementations */
#define LassoAuthentication_clientStart lasso_authentication_client_start
@@ -4011,6 +3988,88 @@ gint LassoAuthentication_buildResponseMsg(LassoAuthentication *self) {
%}
+/***********************************************************************
+ ***********************************************************************
+ * XML Elements in Web Service Security Namespace
+ ***********************************************************************
+ ***********************************************************************/
+
+/***********************************************************************
+ * lasso:WsfProfile
+ ***********************************************************************/
+
+#ifndef SWIGPHP4
+%rename(WsfProfile) LassoWsfProfile;
+#endif
+typedef struct {
+ /* Attributes */
+#ifndef SWIGPHP4
+ %rename(soapEnvelopeRequest) soap_envelope_request;
+#endif
+ %newobject soap_envelope_request_get;
+ LassoSoapEnvelope *soap_envelope_request;
+
+#ifndef SWIGPHP4
+ %rename(soapEnvelopeResponse) soap_envelope_response;
+#endif
+ %newobject soap_envelope_response_get;
+ LassoSoapEnvelope *soap_envelope_response;
+
+
+} LassoWsfProfile;
+%extend LassoWsfProfile {
+
+ /* Attributes */
+ %immutable msgBody;
+ char *msgBody;
+
+ %immutable msgUrl;
+ char *msgUrl;
+
+ /* Constructor, Destructor & Static Methods */
+
+ LassoWsfProfile(LassoServer *server);
+
+ ~LassoWsfProfile();
+
+ /* Methods */
+
+ void buildSoapRequestMsg();
+ void buildSoapResponseMsg();
+ void initSoapRequest(LassoNode *request);
+ void processSoapRequestMsg(char *soapRequestMsg);
+ void processSoapResponseMsg(char *soapResponseMsg);
+ LassoSoapBindingProvider *setProviderSoapRequest(const char *providerId);
+}
+
+%{
+
+/* msgBody */
+#define LassoWsfProfile_get_msgBody(self) LASSO_WSF_PROFILE(self)->msg_body
+#define LassoWsfProfile_msgBody_get(self) LASSO_WSF_PROFILE(self)->msg_body
+
+/* msgUrl */
+#define LassoWsfProfile_get_msgUrl(self) LASSO_WSF_PROFILE(self)->msg_url
+#define LassoWsfProfile_msgUrl_get(self) LASSO_WSF_PROFILE(self)->msg_url
+
+/* Constructors, destructors & static methods implementations */
+#define new_LassoWsfProfile lasso_wsf_profile_new
+#define delete_LassoWsfProfile(self) lasso_node_destroy(LASSO_NODE(self))
+
+/* Implementations of methods inherited from LassoNode */
+
+/* Attributes Implementations */
+
+/* Methods implementations */
+#define LassoWsfProfile_buildSoapRequestMsg lasso_wsf_profile_build_soap_request_msg
+#define LassoWsfProfile_buildSoapResponseMsg lasso_wsf_profile_build_soap_response_msg
+#define LassoWsfProfile_initSoapRequest lasso_wsf_profile_init_soap_request
+#define LassoWsfProfile_processSoapRequestMsg lasso_wsf_profile_process_soap_request_msg
+#define LassoWsfProfile_processSoapResponseMsg lasso_wsf_profile_process_soap_response_msg
+#define LassoWsfProfile_setProviderSoapRequest lasso_wsf_profile_set_provider_soap_request
+
+%}
+
/***********************************************************************
***********************************************************************
diff --git a/swig/Lasso.i b/swig/Lasso.i
index 90b10939..b37b5348 100644
--- a/swig/Lasso.i
+++ b/swig/Lasso.i
@@ -748,6 +748,7 @@ typedef enum {
#ifndef SWIGPHP4
%rename(LIB_PROTOCOL_PROFILE_BRWS_ART) LASSO_LIB_PROTOCOL_PROFILE_BRWS_ART;
%rename(LIB_PROTOCOL_PROFILE_BRWS_POST) LASSO_LIB_PROTOCOL_PROFILE_BRWS_POST;
+%rename(LIB_PROTOCOL_PROFILE_BRWS_LECP) LASSO_LIB_PROTOCOL_PROFILE_BRWS_LECP;
%rename(LIB_PROTOCOL_PROFILE_FED_TERM_IDP_HTTP) LASSO_LIB_PROTOCOL_PROFILE_FED_TERM_IDP_HTTP;
%rename(LIB_PROTOCOL_PROFILE_FED_TERM_IDP_SOAP) LASSO_LIB_PROTOCOL_PROFILE_FED_TERM_IDP_SOAP;
%rename(LIB_PROTOCOL_PROFILE_FED_TERM_SP_HTTP) LASSO_LIB_PROTOCOL_PROFILE_FED_TERM_SP_HTTP;
@@ -763,6 +764,7 @@ typedef enum {
#endif
#define LASSO_LIB_PROTOCOL_PROFILE_BRWS_ART "http://projectliberty.org/profiles/brws-art"
#define LASSO_LIB_PROTOCOL_PROFILE_BRWS_POST "http://projectliberty.org/profiles/brws-post"
+#define LASSO_LIB_PROTOCOL_PROFILE_BRWS_LECP "http://projectliberty.org/profiles/lecp"
#define LASSO_LIB_PROTOCOL_PROFILE_FED_TERM_IDP_HTTP "http://projectliberty.org/profiles/fedterm-idp-http"
#define LASSO_LIB_PROTOCOL_PROFILE_FED_TERM_IDP_SOAP "http://projectliberty.org/profiles/fedterm-idp-soap"
#define LASSO_LIB_PROTOCOL_PROFILE_FED_TERM_SP_HTTP "http://projectliberty.org/profiles/fedterm-sp-http"
@@ -780,11 +782,13 @@ typedef enum {
#ifndef SWIGPHP4
%rename(LOGIN_PROTOCOL_PROFILE_BRWS_ART) LASSO_LOGIN_PROTOCOL_PROFILE_BRWS_ART;
%rename(LOGIN_PROTOCOL_PROFILE_BRWS_POST) LASSO_LOGIN_PROTOCOL_PROFILE_BRWS_POST;
+%rename(LOGIN_PROTOCOL_PROFILE_BRWS_LECP) LASSO_LOGIN_PROTOCOL_PROFILE_BRWS_LECP;
%rename(LoginProtocolProfile) LassoLoginProtocolProfile;
#endif
typedef enum {
LASSO_LOGIN_PROTOCOL_PROFILE_BRWS_ART = 1,
LASSO_LOGIN_PROTOCOL_PROFILE_BRWS_POST,
+ LASSO_LOGIN_PROTOCOL_PROFILE_BRWS_LECP,
} LassoLoginProtocolProfile;
/* ProviderRole */