summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrederic Peters <fpeters@entrouvert.com>2006-11-08 13:07:57 +0000
committerFrederic Peters <fpeters@entrouvert.com>2006-11-08 13:07:57 +0000
commitd99eecd5886d76b78efe8707f4c7c1d67589b532 (patch)
tree4129ff281fe7143ee4542fbc75e03c3ed7312f41
parent057eb4d990cbd7cc8b21d24e68e6056801389c3a (diff)
error on sso initiated by idp and no endpoint defined as default for sp
-rw-r--r--lasso/errors.c2
-rw-r--r--lasso/errors.h1
-rw-r--r--lasso/saml-2.0/login.c3
-rw-r--r--swig/Lasso.i1
4 files changed, 6 insertions, 1 deletions
diff --git a/lasso/errors.c b/lasso/errors.c
index 2f2aa6af..a32959a9 100644
--- a/lasso/errors.c
+++ b/lasso/errors.c
@@ -156,6 +156,8 @@ lasso_strerror(int error_code)
return "Federation not found on login";
case LASSO_LOGIN_ERROR_REQUEST_DENIED:
return "Request denied";
+ case LASSO_LOGIN_ERROR_NO_DEFAULT_ENDPOINT:
+ return "No default endpoint";
case LASSO_SOAP_FAULT_REDIRECT_REQUEST:
return "Redirect request from Attribute Provider";
diff --git a/lasso/errors.h b/lasso/errors.h
index 7452a936..af377f25 100644
--- a/lasso/errors.h
+++ b/lasso/errors.h
@@ -105,6 +105,7 @@
#define LASSO_LOGIN_ERROR_UNSIGNED_AUTHN_REQUEST 606
#define LASSO_LOGIN_ERROR_STATUS_NOT_SUCCESS 607
#define LASSO_LOGIN_ERROR_UNKNOWN_PRINCIPAL 608
+#define LASSO_LOGIN_ERROR_NO_DEFAULT_ENDPOINT 609
/* Federation Termination Notification */
#define LASSO_DEFEDERATION_ERROR_MISSING_NAME_IDENTIFIER -700
diff --git a/lasso/saml-2.0/login.c b/lasso/saml-2.0/login.c
index e5e1e8a9..17421c9c 100644
--- a/lasso/saml-2.0/login.c
+++ b/lasso/saml-2.0/login.c
@@ -220,7 +220,8 @@ lasso_saml20_login_process_authn_request_msg(LassoLogin *login, const char *auth
binding = lasso_saml20_provider_get_assertion_consumer_service_binding(
remote_provider, service_index);
if (binding == NULL) {
- message(G_LOG_LEVEL_WARNING, "can't find binding for index");
+ if (service_index == -1)
+ return LASSO_LOGIN_ERROR_NO_DEFAULT_ENDPOINT;
} else if (strcmp(binding, "HTTP-Artifact") == 0) {
login->protocolProfile = LASSO_LOGIN_PROTOCOL_PROFILE_BRWS_ART;
} else if (strcmp(binding, "HTTP-POST") == 0) {
diff --git a/swig/Lasso.i b/swig/Lasso.i
index 2e014da5..d654d0bd 100644
--- a/swig/Lasso.i
+++ b/swig/Lasso.i
@@ -1101,6 +1101,7 @@ typedef enum {
%rename(LOGIN_ERROR_UNSIGNED_AUTHN_REQUEST) LASSO_LOGIN_ERROR_UNSIGNED_AUTHN_REQUEST;
%rename(LOGIN_ERROR_STATUS_NOT_SUCCESS) LASSO_LOGIN_ERROR_STATUS_NOT_SUCCESS;
%rename(LOGIN_ERROR_UNKNOWN_PRINCIPAL) LASSO_LOGIN_ERROR_UNKNOWN_PRINCIPAL;
+%rename(LOGIN_ERROR_NO_DEFAULT_ENDPOINT) LASSO_LOGIN_ERROR_NO_DEFAULT_ENDPOINT;
#endif
/* Federation Termination Notification */