summaryrefslogtreecommitdiffstats
path: root/auth_mellon_handler.c
diff options
context:
space:
mode:
Diffstat (limited to 'auth_mellon_handler.c')
-rw-r--r--auth_mellon_handler.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/auth_mellon_handler.c b/auth_mellon_handler.c
index 1d42fd7..e5c82a6 100644
--- a/auth_mellon_handler.c
+++ b/auth_mellon_handler.c
@@ -1974,6 +1974,7 @@ static int am_handle_post_reply(request_rec *r)
LassoServer *server;
LassoLogin *login;
char *relay_state;
+ int i, err;
/* Make sure that this is a POST request. */
if(r->method_number != M_POST) {
@@ -2040,7 +2041,14 @@ static int am_handle_post_reply(request_rec *r)
" Lasso error: [%i] %s", rc, lasso_strerror(rc));
lasso_login_destroy(login);
- return HTTP_BAD_REQUEST;
+ err = HTTP_BAD_REQUEST;
+ for (i = 0; auth_mellon_errormap[i].lasso_error != 0; i++) {
+ if (auth_mellon_errormap[i].lasso_error == rc) {
+ err = auth_mellon_errormap[i].http_error;
+ break;
+ }
+ }
+ return err;
}
/* Extract RelayState parameter. */