summaryrefslogtreecommitdiffstats
path: root/lasso
diff options
context:
space:
mode:
authorValery Febvre <vfebvre at easter-eggs.com>2004-08-04 13:48:00 +0000
committerValery Febvre <vfebvre at easter-eggs.com>2004-08-04 13:48:00 +0000
commit26b653ed84054c82745ed8ce6da195e7738adcff (patch)
tree967ddbe2f658bd7a39ffa2718cc99fcbc93737c3 /lasso
parent7659cf3f8d5e6b73089db3ab7e6cdda76868846a (diff)
downloadlasso-26b653ed84054c82745ed8ce6da195e7738adcff.tar.gz
lasso-26b653ed84054c82745ed8ce6da195e7738adcff.tar.xz
lasso-26b653ed84054c82745ed8ce6da195e7738adcff.zip
Added the SOAP HTTP method in lasso_login_init_from_authn_request_msg()
Diffstat (limited to 'lasso')
-rw-r--r--lasso/id-ff/login.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/lasso/id-ff/login.c b/lasso/id-ff/login.c
index 04aaa88b..5fee9229 100644
--- a/lasso/id-ff/login.c
+++ b/lasso/id-ff/login.c
@@ -698,9 +698,9 @@ lasso_login_init_from_authn_request_msg(LassoLogin *login,
GError *err = NULL;
if (authn_request_method != lassoHttpMethodRedirect && \
- authn_request_method != lassoHttpMethodGet && \
- authn_request_method != lassoHttpMethodPost) {
- message(G_LOG_LEVEL_ERROR, "Invalid HTTP method, it could be REDIRECT/GET or POST\n.");
+ authn_request_method != lassoHttpMethodPost && \
+ authn_request_method != lassoHttpMethodSoap) {
+ message(G_LOG_LEVEL_ERROR, "Invalid HTTP method, it could be REDIRECT, POST or SOAP (LECP)\n.");
return (-1);
}
@@ -708,16 +708,20 @@ lasso_login_init_from_authn_request_msg(LassoLogin *login,
/* rebuild request */
switch (authn_request_method) {
- case lassoHttpMethodGet:
case lassoHttpMethodRedirect:
/* LibAuthnRequest send by method GET */
LASSO_PROFILE(login)->request = lasso_authn_request_new_from_export(authn_request_msg,
- lassoNodeExportTypeQuery);
+ lassoNodeExportTypeQuery);
break;
case lassoHttpMethodPost:
/* TODO LibAuthnRequest send by method POST */
message(G_LOG_LEVEL_MESSAGE, "HTTP method POST isn't implemented yet.\n");
return (-2);
+ case lassoHttpMethodSoap:
+ /* LibAuthnRequest send by method SOAP - usefull only for LECP */
+ LASSO_PROFILE(login)->request = lasso_authn_request_new_from_export(authn_request_msg,
+ lassoNodeExportTypeSoap);
+ break;
}
LASSO_PROFILE(login)->request_type = lassoMessageTypeAuthnRequest;
@@ -813,15 +817,13 @@ lasso_login_init_request(LassoLogin *login,
xmlChar *artifact, *identityProviderSuccinctID;
if (response_method != lassoHttpMethodRedirect && \
- response_method != lassoHttpMethodGet && \
response_method != lassoHttpMethodPost) {
- message(G_LOG_LEVEL_ERROR, "Invalid HTTP method, it could be REDIRECT/GET or POST\n.");
+ message(G_LOG_LEVEL_ERROR, "Invalid HTTP method, it could be REDIRECT or POST\n.");
return (-1);
}
/* rebuild response (artifact) */
switch (response_method) {
- case lassoHttpMethodGet:
case lassoHttpMethodRedirect:
/* artifact by REDIRECT */
response = lasso_artifact_new_from_query(response_msg);
@@ -835,7 +837,7 @@ lasso_login_init_request(LassoLogin *login,
/* get remote identityProviderSuccinctID */
identityProviderSuccinctID = lasso_artifact_get_identityProviderSuccinctID(LASSO_ARTIFACT(response));
LASSO_PROFILE(login)->remote_providerID = lasso_server_get_providerID_from_hash(LASSO_PROFILE(login)->server,
- identityProviderSuccinctID);
+ identityProviderSuccinctID);
xmlFree(identityProviderSuccinctID);
LASSO_PROFILE(login)->response_type = lassoMessageTypeArtifact;