summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lasso/id-ff/defederation.c14
-rw-r--r--lasso/id-ff/login.c26
-rw-r--r--lasso/id-ff/logout.c8
-rw-r--r--lasso/id-ff/name_identifier_mapping.c8
-rw-r--r--lasso/id-ff/name_registration.c8
-rw-r--r--lasso/xml/errors.c8
-rw-r--r--lasso/xml/errors.h63
-rw-r--r--swig/Lasso.i67
8 files changed, 106 insertions, 96 deletions
diff --git a/lasso/id-ff/defederation.c b/lasso/id-ff/defederation.c
index 19c77f12..6d7150ec 100644
--- a/lasso/id-ff/defederation.c
+++ b/lasso/id-ff/defederation.c
@@ -390,6 +390,11 @@ lasso_defederation_process_notification_msg(LassoDefederation *defederation,
case lassoHttpMethodSoap:
debug("Build a federation termination notification from soap msg\n");
profile->request = lasso_federation_termination_notification_new_from_export(notification_msg, lassoNodeExportTypeSoap);
+ if (LASSO_IS_FEDERATION_TERMINATION_NOTIFICATION(profile->request) == FALSE) {
+ message(G_LOG_LEVEL_CRITICAL, lasso_strerror(LASSO_PROFILE_ERROR_INVALID_SOAP_MSG));
+ ret = LASSO_PROFILE_ERROR_INVALID_SOAP_MSG;
+ goto done;
+ }
break;
case lassoHttpMethodRedirect:
debug("Build a federation termination notification from query msg\n");
@@ -400,13 +405,8 @@ lasso_defederation_process_notification_msg(LassoDefederation *defederation,
}
break;
default:
- message(G_LOG_LEVEL_CRITICAL, "Invalid notification method\n");
- ret = -1;
- goto done;
- }
- if (profile->request==NULL) {
- message(G_LOG_LEVEL_CRITICAL, "Error while building the notification from msg\n");
- ret = -1;
+ message(G_LOG_LEVEL_CRITICAL, lasso_strerror(LASSO_PROFILE_ERROR_INVALID_HTTP_METHOD));
+ ret = LASSO_PROFILE_ERROR_INVALID_HTTP_METHOD;
goto done;
}
diff --git a/lasso/id-ff/login.c b/lasso/id-ff/login.c
index 6edcc1fe..82d7c473 100644
--- a/lasso/id-ff/login.c
+++ b/lasso/id-ff/login.c
@@ -1206,36 +1206,36 @@ lasso_login_process_authn_request_msg(LassoLogin *login,
g_return_val_if_fail(LASSO_IS_LOGIN(login), LASSO_PARAM_ERROR_BAD_TYPE_OR_NULL_OBJ);
g_return_val_if_fail(authn_request_msg != NULL, LASSO_PARAM_ERROR_INVALID_VALUE);
- if (authn_request_http_method != lassoHttpMethodRedirect && \
- authn_request_http_method != lassoHttpMethodPost && \
- authn_request_http_method != lassoHttpMethodSoap) {
- message(G_LOG_LEVEL_CRITICAL, "Invalid HTTP method, it could be REDIRECT, POST or SOAP (LECP)\n.");
- return LASSO_PARAM_ERROR_INVALID_VALUE;
- }
-
/* rebuild request */
switch (authn_request_http_method) {
case lassoHttpMethodRedirect:
/* LibAuthnRequest send by method GET */
LASSO_PROFILE(login)->request = lasso_authn_request_new_from_export(authn_request_msg,
lassoNodeExportTypeQuery);
+ if (LASSO_PROFILE(login)->request == NULL) {
+ return LASSO_PROFILE_ERROR_INVALID_QUERY;
+ }
break;
case lassoHttpMethodPost:
/* LibAuthnRequest send by method POST */
LASSO_PROFILE(login)->request = lasso_authn_request_new_from_export(authn_request_msg,
lassoNodeExportTypeBase64);
+ if (LASSO_PROFILE(login)->request == NULL) {
+ message(G_LOG_LEVEL_CRITICAL, lasso_strerror(LASSO_PROFILE_ERROR_INVALID_POST_MSG));
+ return LASSO_PROFILE_ERROR_INVALID_POST_MSG;
+ }
break;
case lassoHttpMethodSoap:
/* LibAuthnRequest send by method SOAP - useful only for LECP */
LASSO_PROFILE(login)->request = lasso_authn_request_new_from_export(authn_request_msg,
lassoNodeExportTypeSoap);
- break;
+ if (LASSO_PROFILE(login)->request == NULL) {
+ message(G_LOG_LEVEL_CRITICAL, lasso_strerror(LASSO_PROFILE_ERROR_INVALID_SOAP_MSG));
+ return LASSO_PROFILE_ERROR_INVALID_SOAP_MSG;
+ }
default:
- break;
- }
- if (LASSO_PROFILE(login)->request == NULL) {
- message(G_LOG_LEVEL_CRITICAL, lasso_strerror(LASSO_PROFILE_ERROR_INVALID_QUERY));
- return LASSO_PROFILE_ERROR_INVALID_QUERY;
+ message(G_LOG_LEVEL_CRITICAL, lasso_strerror(LASSO_PROFILE_ERROR_INVALID_HTTP_METHOD));
+ return LASSO_PROFILE_ERROR_INVALID_HTTP_METHOD;
}
LASSO_PROFILE(login)->request_type = lassoMessageTypeAuthnRequest;
diff --git a/lasso/id-ff/logout.c b/lasso/id-ff/logout.c
index 89219341..edeb12ce 100644
--- a/lasso/id-ff/logout.c
+++ b/lasso/id-ff/logout.c
@@ -611,8 +611,8 @@ gint lasso_logout_process_request_msg(LassoLogout *logout,
/* verify requets is a LogoutRequest */
if (LASSO_IS_LOGOUT_REQUEST(profile->request) == FALSE) {
- message(G_LOG_LEVEL_CRITICAL, "Message is not a LogoutRequest\n");
- ret = -1;
+ message(G_LOG_LEVEL_CRITICAL, lasso_strerror(LASSO_PROFILE_ERROR_INVALID_SOAP_MSG));
+ ret = LASSO_PROFILE_ERROR_INVALID_SOAP_MSG;
goto done;
}
@@ -646,8 +646,8 @@ gint lasso_logout_process_request_msg(LassoLogout *logout,
break;
default:
- message(G_LOG_LEVEL_CRITICAL, "Invalid request method\n");
- ret = -1;
+ message(G_LOG_LEVEL_CRITICAL, lasso_strerror(LASSO_PROFILE_ERROR_INVALID_HTTP_METHOD));
+ ret = LASSO_PROFILE_ERROR_INVALID_HTTP_METHOD;
goto done;
}
diff --git a/lasso/id-ff/name_identifier_mapping.c b/lasso/id-ff/name_identifier_mapping.c
index 065960ff..28bcc8f5 100644
--- a/lasso/id-ff/name_identifier_mapping.c
+++ b/lasso/id-ff/name_identifier_mapping.c
@@ -296,14 +296,14 @@ lasso_name_identifier_mapping_process_request_msg(LassoNameIdentifierMapping *ma
case lassoHttpMethodSoap:
profile->request = lasso_name_identifier_mapping_request_new_from_export(request_msg, lassoNodeExportTypeSoap);
if (LASSO_IS_NAME_IDENTIFIER_MAPPING_REQUEST(profile->request) == FALSE) {
- message(G_LOG_LEVEL_CRITICAL, "Message is not a NameIdentifierMappingRequest\n");
- ret = -1;
+ message(G_LOG_LEVEL_CRITICAL, lasso_strerror(LASSO_PROFILE_ERROR_INVALID_SOAP_MSG));
+ ret = LASSO_PROFILE_ERROR_INVALID_SOAP_MSG;
goto done;
}
break;
default:
- message(G_LOG_LEVEL_CRITICAL, "Invalid request method\n");
- ret = -1;
+ message(G_LOG_LEVEL_CRITICAL, lasso_strerror(LASSO_PROFILE_ERROR_INVALID_HTTP_METHOD));
+ ret = LASSO_PROFILE_ERROR_INVALID_HTTP_METHOD;
goto done;
}
diff --git a/lasso/id-ff/name_registration.c b/lasso/id-ff/name_registration.c
index c0fafec8..a7c5557c 100644
--- a/lasso/id-ff/name_registration.c
+++ b/lasso/id-ff/name_registration.c
@@ -506,8 +506,8 @@ gint lasso_name_registration_process_request_msg(LassoNameRegistration *name_reg
case lassoHttpMethodSoap:
profile->request = lasso_register_name_identifier_request_new_from_export(request_msg, lassoNodeExportTypeSoap);
if (LASSO_IS_REGISTER_NAME_IDENTIFIER_REQUEST(profile->request) == FALSE) {
- message(G_LOG_LEVEL_CRITICAL, "Message is not a RegisterNameIdentifierRequest\n");
- ret = -1;
+ message(G_LOG_LEVEL_CRITICAL, lasso_strerror(LASSO_PROFILE_ERROR_INVALID_SOAP_MSG));
+ ret = LASSO_PROFILE_ERROR_INVALID_SOAP_MSG;
goto done;
}
break;
@@ -519,8 +519,8 @@ gint lasso_name_registration_process_request_msg(LassoNameRegistration *name_reg
}
break;
default:
- message(G_LOG_LEVEL_CRITICAL, "Invalid request method\n");
- ret = -1;
+ message(G_LOG_LEVEL_CRITICAL, lasso_strerror(LASSO_PROFILE_ERROR_INVALID_HTTP_METHOD));
+ ret = LASSO_PROFILE_ERROR_INVALID_HTTP_METHOD;
goto done;
}
diff --git a/lasso/xml/errors.c b/lasso/xml/errors.c
index 12878d76..3c4ee2f9 100644
--- a/lasso/xml/errors.c
+++ b/lasso/xml/errors.c
@@ -74,9 +74,15 @@ lasso_strerror(int error_code)
return "Unsupported logout protocol profile\n";
case LASSO_PROFILE_ERROR_INVALID_QUERY:
- return "Error while parsing query message\n";
+ return "Invalid URL query\n";
+ case LASSO_PROFILE_ERROR_INVALID_POST_MSG:
+ return "Invalid POST message\n";
+ case LASSO_PROFILE_ERROR_INVALID_SOAP_MSG:
+ return "Invalid SOAP message\n";
case LASSO_PROFILE_ERROR_MISSING_REQUEST:
return "Missing request\n";
+ case LASSO_PROFILE_ERROR_INVALID_HTTP_METHOD:
+ return "Invalid HTTP method\n";
case LASSO_PARAM_ERROR_BAD_TYPE_OR_NULL_OBJ:
return "An object type provided as parameter is invalid or object is NULL.\n";
diff --git a/lasso/xml/errors.h b/lasso/xml/errors.h
index 80de3311..248d7029 100644
--- a/lasso/xml/errors.h
+++ b/lasso/xml/errors.h
@@ -27,50 +27,51 @@
/* Positive errors : Liberty Alliance recoverable errors */
/* generic XML */
-#define LASSO_XML_ERROR_NODE_NOT_FOUND -10
-#define LASSO_XML_ERROR_NODE_CONTENT_NOT_FOUND -11
-#define LASSO_XML_ERROR_ATTR_NOT_FOUND -12
-#define LASSO_XML_ERROR_ATTR_VALUE_NOT_FOUND -13
+#define LASSO_XML_ERROR_NODE_NOT_FOUND -10
+#define LASSO_XML_ERROR_NODE_CONTENT_NOT_FOUND -11
+#define LASSO_XML_ERROR_ATTR_NOT_FOUND -12
+#define LASSO_XML_ERROR_ATTR_VALUE_NOT_FOUND -13
/* XMLDSig */
-#define LASSO_DS_ERROR_SIGNATURE_NOT_FOUND 101
-#define LASSO_DS_ERROR_INVALID_SIGNATURE 102
-
-#define LASSO_DS_ERROR_SIGNATURE_TMPL_CREATION_FAILED -101
-#define LASSO_DS_ERROR_CONTEXT_CREATION_FAILED -102
-#define LASSO_DS_ERROR_PUBLIC_KEY_LOAD_FAILED -103
-#define LASSO_DS_ERROR_PRIVATE_KEY_LOAD_FAILED -104
-#define LASSO_DS_ERROR_CERTIFICATE_LOAD_FAILED -105
-#define LASSO_DS_ERROR_SIGNATURE_FAILED -106
-#define LASSO_DS_ERROR_KEYS_MNGR_CREATION_FAILED -107
-#define LASSO_DS_ERROR_KEYS_MNGR_INIT_FAILED -108
-#define LASSO_DS_ERROR_SIGNATURE_VERIFICATION_FAILED -109
-#define LASSO_DS_ERROR_CA_CERT_CHAIN_LOAD_FAILED -110
-#define LASSO_DS_ERROR_INVALID_SIGALG -111
+#define LASSO_DS_ERROR_SIGNATURE_NOT_FOUND 101
+#define LASSO_DS_ERROR_INVALID_SIGNATURE 102
+#define LASSO_DS_ERROR_SIGNATURE_TMPL_CREATION_FAILED -103
+#define LASSO_DS_ERROR_CONTEXT_CREATION_FAILED -104
+#define LASSO_DS_ERROR_PUBLIC_KEY_LOAD_FAILED -105
+#define LASSO_DS_ERROR_PRIVATE_KEY_LOAD_FAILED -106
+#define LASSO_DS_ERROR_CERTIFICATE_LOAD_FAILED -107
+#define LASSO_DS_ERROR_SIGNATURE_FAILED -108
+#define LASSO_DS_ERROR_KEYS_MNGR_CREATION_FAILED -109
+#define LASSO_DS_ERROR_KEYS_MNGR_INIT_FAILED -110
+#define LASSO_DS_ERROR_SIGNATURE_VERIFICATION_FAILED -111
+#define LASSO_DS_ERROR_CA_CERT_CHAIN_LOAD_FAILED -112
+#define LASSO_DS_ERROR_INVALID_SIGALG -113
/* server */
-#define LASSO_SERVER_ERROR_PROVIDER_NOT_FOUND -201
-#define LASSO_SERVER_ERROR_ADD_PROVIDER_FAILED -202
+#define LASSO_SERVER_ERROR_PROVIDER_NOT_FOUND -201
+#define LASSO_SERVER_ERROR_ADD_PROVIDER_FAILED -202
/* logout */
-#define LASSO_LOGOUT_ERROR_UNSUPPORTED_PROFILE -301
+#define LASSO_LOGOUT_ERROR_UNSUPPORTED_PROFILE -301
/* profile */
-#define LASSO_PROFILE_ERROR_INVALID_QUERY -401
-#define LASSO_PROFILE_ERROR_MISSING_REQUEST -402
+#define LASSO_PROFILE_ERROR_INVALID_QUERY 401
+#define LASSO_PROFILE_ERROR_INVALID_POST_MSG -402
+#define LASSO_PROFILE_ERROR_INVALID_SOAP_MSG -403
+#define LASSO_PROFILE_ERROR_MISSING_REQUEST -404
+#define LASSO_PROFILE_ERROR_INVALID_HTTP_METHOD -405
/* functions/methods parameters checking */
-#define LASSO_PARAM_ERROR_BAD_TYPE_OR_NULL_OBJ -501
-#define LASSO_PARAM_ERROR_INVALID_VALUE -502
-#define LASSO_PARAM_ERROR_CHECK_FAILED -503
+#define LASSO_PARAM_ERROR_BAD_TYPE_OR_NULL_OBJ -501
+#define LASSO_PARAM_ERROR_INVALID_VALUE -502
+#define LASSO_PARAM_ERROR_CHECK_FAILED -503
/* login */
-#define LASSO_LOGIN_ERROR_FEDERATION_NOT_FOUND 601
-#define LASSO_LOGIN_ERROR_CONSENT_NOT_OBTAINED 602
-
-#define LASSO_LOGIN_ERROR_INVALID_NAMEIDPOLICY -601
+#define LASSO_LOGIN_ERROR_FEDERATION_NOT_FOUND 601
+#define LASSO_LOGIN_ERROR_CONSENT_NOT_OBTAINED 602
+#define LASSO_LOGIN_ERROR_INVALID_NAMEIDPOLICY -603
/* others */
-#define LASSO_ERROR_UNDEFINED -999
+#define LASSO_ERROR_UNDEFINED -999
const char* lasso_strerror(int error_code);
diff --git a/swig/Lasso.i b/swig/Lasso.i
index 68679fc6..9ff1e39d 100644
--- a/swig/Lasso.i
+++ b/swig/Lasso.i
@@ -418,16 +418,15 @@ typedef enum {
%rename(XML_ERROR_ATTR_NOT_FOUND) LASSO_XML_ERROR_ATTR_NOT_FOUND;
%rename(XML_ERROR_ATTR_VALUE_NOT_FOUND) LASSO_XML_ERROR_ATTR_VALUE_NOT_FOUND;
#endif
-#define LASSO_XML_ERROR_NODE_NOT_FOUND -10
-#define LASSO_XML_ERROR_NODE_CONTENT_NOT_FOUND -11
-#define LASSO_XML_ERROR_ATTR_NOT_FOUND -12
-#define LASSO_XML_ERROR_ATTR_VALUE_NOT_FOUND -13
+#define LASSO_XML_ERROR_NODE_NOT_FOUND -10
+#define LASSO_XML_ERROR_NODE_CONTENT_NOT_FOUND -11
+#define LASSO_XML_ERROR_ATTR_NOT_FOUND -12
+#define LASSO_XML_ERROR_ATTR_VALUE_NOT_FOUND -13
/* XMLDSig */
#ifndef SWIGPHP4
%rename(DS_ERROR_SIGNATURE_NOT_FOUND) LASSO_DS_ERROR_SIGNATURE_NOT_FOUND;
%rename(DS_ERROR_INVALID_SIGNATURE) LASSO_DS_ERROR_INVALID_SIGNATURE;
-
%rename(DS_ERROR_SIGNATURE_TMPL_CREATION_FAILED) LASSO_DS_ERROR_SIGNATURE_TMPL_CREATION_FAILED;
%rename(DS_ERROR_CONTEXT_CREATION_FAILED) LASSO_DS_ERROR_CONTEXT_CREATION_FAILED;
%rename(DS_ERROR_PUBLIC_KEY_LOAD_FAILED) LASSO_DS_ERROR_PUBLIC_KEY_LOAD_FAILED;
@@ -440,42 +439,47 @@ typedef enum {
%rename(DS_ERROR_CA_CERT_CHAIN_LOAD_FAILED) LASSO_DS_ERROR_CA_CERT_CHAIN_LOAD_FAILED;
%rename(LASSO_DS_ERROR_INVALID_SIGALG) LASSO_DS_ERROR_INVALID_SIGALG;
#endif
-#define LASSO_DS_ERROR_SIGNATURE_NOT_FOUND 101
-#define LASSO_DS_ERROR_INVALID_SIGNATURE 102
-
-#define LASSO_DS_ERROR_SIGNATURE_TMPL_CREATION_FAILED -101
-#define LASSO_DS_ERROR_CONTEXT_CREATION_FAILED -102
-#define LASSO_DS_ERROR_PUBLIC_KEY_LOAD_FAILED -103
-#define LASSO_DS_ERROR_PRIVATE_KEY_LOAD_FAILED -104
-#define LASSO_DS_ERROR_CERTIFICATE_LOAD_FAILED -105
-#define LASSO_DS_ERROR_SIGNATURE_FAILED -106
-#define LASSO_DS_ERROR_KEYS_MNGR_CREATION_FAILED -107
-#define LASSO_DS_ERROR_KEYS_MNGR_INIT_FAILED -108
-#define LASSO_DS_ERROR_SIGNATURE_VERIFICATION_FAILED -109
-#define LASSO_DS_ERROR_CA_CERT_CHAIN_LOAD_FAILED -110
-#define LASSO_DS_ERROR_INVALID_SIGALG -111
+#define LASSO_DS_ERROR_SIGNATURE_NOT_FOUND 101
+#define LASSO_DS_ERROR_INVALID_SIGNATURE 102
+#define LASSO_DS_ERROR_SIGNATURE_TMPL_CREATION_FAILED -103
+#define LASSO_DS_ERROR_CONTEXT_CREATION_FAILED -104
+#define LASSO_DS_ERROR_PUBLIC_KEY_LOAD_FAILED -105
+#define LASSO_DS_ERROR_PRIVATE_KEY_LOAD_FAILED -106
+#define LASSO_DS_ERROR_CERTIFICATE_LOAD_FAILED -107
+#define LASSO_DS_ERROR_SIGNATURE_FAILED -108
+#define LASSO_DS_ERROR_KEYS_MNGR_CREATION_FAILED -109
+#define LASSO_DS_ERROR_KEYS_MNGR_INIT_FAILED -110
+#define LASSO_DS_ERROR_SIGNATURE_VERIFICATION_FAILED -111
+#define LASSO_DS_ERROR_CA_CERT_CHAIN_LOAD_FAILED -112
+#define LASSO_DS_ERROR_INVALID_SIGALG -113
/* server */
#ifndef SWIGPHP4
%rename(SERVER_ERROR_PROVIDER_NOT_FOUND) LASSO_SERVER_ERROR_PROVIDER_NOT_FOUND;
%rename(SERVER_ERROR_ADD_PROVIDER_FAILED) LASSO_SERVER_ERROR_ADD_PROVIDER_FAILED;
#endif
-#define LASSO_SERVER_ERROR_PROVIDER_NOT_FOUND -201
-#define LASSO_SERVER_ERROR_ADD_PROVIDER_FAILED -202
+#define LASSO_SERVER_ERROR_PROVIDER_NOT_FOUND -201
+#define LASSO_SERVER_ERROR_ADD_PROVIDER_FAILED -202
/* logout */
#ifndef SWIGPHP4
%rename(LOGOUT_ERROR_UNSUPPORTED_PROFILE) LASSO_LOGOUT_ERROR_UNSUPPORTED_PROFILE;
#endif
-#define LASSO_LOGOUT_ERROR_UNSUPPORTED_PROFILE -301
+#define LASSO_LOGOUT_ERROR_UNSUPPORTED_PROFILE -301
/* profile */
#ifndef SWIGPHP4
%rename(PROFILE_ERROR_INVALID_QUERY) LASSO_PROFILE_ERROR_INVALID_QUERY;
+%rename(PROFILE_ERROR_INVALID_POST_MSG) LASSO_PROFILE_ERROR_INVALID_POST_MSG;
+%rename(PROFILE_ERROR_INVALID_SOAP_MSG) LASSO_PROFILE_ERROR_INVALID_SOAP_MSG;
%rename(PROFILE_ERROR_MISSING_REQUEST) LASSO_PROFILE_ERROR_MISSING_REQUEST;
+%rename(PROFILE_ERROR_INVALID_HTTP_METHOD) LASSO_PROFILE_ERROR_INVALID_HTTP_METHOD;
#endif
-#define LASSO_PROFILE_ERROR_INVALID_QUERY -401
-#define LASSO_PROFILE_ERROR_MISSING_REQUEST -402
+#define LASSO_PROFILE_ERROR_INVALID_QUERY 401
+#define LASSO_PROFILE_ERROR_INVALID_POST_MSG -402
+#define LASSO_PROFILE_ERROR_INVALID_SOAP_MSG -403
+#define LASSO_PROFILE_ERROR_MISSING_REQUEST -404
+#define LASSO_PROFILE_ERROR_INVALID_HTTP_METHOD -404
/* functions/methods parameters checking */
#ifndef SWIGPHP4
@@ -483,9 +487,9 @@ typedef enum {
%rename(PARAM_ERROR_INVALID_VALUE) LASSO_PARAM_ERROR_INVALID_VALUE;
%rename(PARAM_ERROR_ERR_CHECK_FAILED) LASSO_PARAM_ERROR_ERR_CHECK_FAILED;
#endif
-#define LASSO_PARAM_ERROR_BADTYPE_OR_NULL_OBJ -501
-#define LASSO_PARAM_ERROR_INVALID_VALUE -502
-#define LASSO_PARAM_ERROR_ERR_CHECK_FAILED -503
+#define LASSO_PARAM_ERROR_BAD_TYPE_OR_NULL_OBJ -501
+#define LASSO_PARAM_ERROR_INVALID_VALUE -502
+#define LASSO_PARAM_ERROR_CHECK_FAILED -503
/* login */
#ifndef SWIGPHP4
@@ -493,16 +497,15 @@ typedef enum {
%rename(LOGIN_ERROR_CONSENT_NOT_OBTAINED) LASSO_LOGIN_ERROR_CONSENT_NOT_OBTAINED;
%rename(LASSO_LOGIN_ERROR_INVALID_NAMEIDPOLICY) LASSO_LOGIN_ERROR_INVALID_NAMEIDPOLICY;
#endif
-#define LASSO_LOGIN_ERROR_FEDERATION_NOT_FOUND 601
-#define LASSO_LOGIN_ERROR_CONSENT_NOT_OBTAINED 602
-
-#define LASSO_LOGIN_ERROR_INVALID_NAMEIDPOLICY -601
+#define LASSO_LOGIN_ERROR_FEDERATION_NOT_FOUND 601
+#define LASSO_LOGIN_ERROR_CONSENT_NOT_OBTAINED 602
+#define LASSO_LOGIN_ERROR_INVALID_NAMEIDPOLICY -603
/* others */
#ifndef SWIGPHP4
%rename(ERROR_UNDEFINED) LASSO_ERROR_UNDEFINED;
#endif
-#define LASSO_ERROR_UNDEFINED -999
+#define LASSO_ERROR_UNDEFINED -999
/***********************************************************************