diff options
| author | Frederic Peters <fpeters@entrouvert.com> | 2005-08-10 11:29:52 +0000 |
|---|---|---|
| committer | Frederic Peters <fpeters@entrouvert.com> | 2005-08-10 11:29:52 +0000 |
| commit | 37e124af5d817b5da972fd30ab6fc24b06f48273 (patch) | |
| tree | c372887bfdcde85343ceef8c57e55507a647e5f7 | |
| parent | 0730a7f612edbd49806891cb9b24d3c86eb60dfa (diff) | |
return LASSO_LOGIN_ERROR_UNKNOWN_PRINCIPAL after unsuccessful logon
| -rw-r--r-- | lasso/errors.c | 2 | ||||
| -rw-r--r-- | lasso/errors.h | 1 | ||||
| -rw-r--r-- | lasso/id-ff/login.c | 4 | ||||
| -rw-r--r-- | swig/Lasso.i | 3 |
4 files changed, 9 insertions, 1 deletions
diff --git a/lasso/errors.c b/lasso/errors.c index 6df10a86..263c0de1 100644 --- a/lasso/errors.c +++ b/lasso/errors.c @@ -126,6 +126,8 @@ lasso_strerror(int error_code) case LASSO_DEFEDERATION_ERROR_MISSING_NAME_IDENTIFIER: return "Name identifier not found in request"; + case LASSO_LOGIN_ERROR_UNKNOWN_PRINCIPAL: + return "Unknown principal"; default: return "Undefined error code."; diff --git a/lasso/errors.h b/lasso/errors.h index 63b06f2d..f1e6562f 100644 --- a/lasso/errors.h +++ b/lasso/errors.h @@ -93,6 +93,7 @@ #define LASSO_LOGIN_ERROR_INVALID_SIGNATURE 605 #define LASSO_LOGIN_ERROR_UNSIGNED_AUTHN_REQUEST 606 #define LASSO_LOGIN_ERROR_STATUS_NOT_SUCCESS 607 +#define LASSO_LOGIN_ERROR_UNKNOWN_PRINCIPAL 608 /* Federation Termination Notification */ #define LASSO_DEFEDERATION_ERROR_MISSING_NAME_IDENTIFIER -700 diff --git a/lasso/id-ff/login.c b/lasso/id-ff/login.c index 25b3ab77..797c9e69 100644 --- a/lasso/id-ff/login.c +++ b/lasso/id-ff/login.c @@ -501,6 +501,10 @@ lasso_login_process_response_status_and_assertion(LassoLogin *login) LASSO_LIB_STATUS_CODE_FEDERATION_DOES_NOT_EXIST) == 0) { return LASSO_LOGIN_ERROR_FEDERATION_NOT_FOUND; } + if (strcmp(status_value, + LASSO_LIB_STATUS_CODE_UNKNOWN_PRINCIPAL) == 0) { + return LASSO_LOGIN_ERROR_UNKNOWN_PRINCIPAL; + } } } return LASSO_LOGIN_ERROR_STATUS_NOT_SUCCESS; diff --git a/swig/Lasso.i b/swig/Lasso.i index 2c9e7d36..46f2c93d 100644 --- a/swig/Lasso.i +++ b/swig/Lasso.i @@ -1032,11 +1032,12 @@ typedef enum { #ifndef SWIGPHP4 %rename(LOGIN_ERROR_FEDERATION_NOT_FOUND) LASSO_LOGIN_ERROR_FEDERATION_NOT_FOUND; %rename(LOGIN_ERROR_CONSENT_NOT_OBTAINED) LASSO_LOGIN_ERROR_CONSENT_NOT_OBTAINED; -%rename(LASSO_LOGIN_ERROR_INVALID_NAMEIDPOLICY) LASSO_LOGIN_ERROR_INVALID_NAMEIDPOLICY; +%rename(LOGIN_ERROR_INVALID_NAMEIDPOLICY) LASSO_LOGIN_ERROR_INVALID_NAMEIDPOLICY; %rename(LOGIN_ERROR_REQUEST_DENIED) LASSO_LOGIN_ERROR_REQUEST_DENIED; %rename(LOGIN_ERROR_INVALID_SIGNATURE) LASSO_LOGIN_ERROR_INVALID_SIGNATURE; %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; #endif /* Federation Termination Notification */ |
