aboutsummaryrefslogtreecommitdiff
path: root/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/ProtocolFinalizationController.java
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2016-02-18 11:01:55 +0100
committerThomas Lenz <tlenz@iaik.tugraz.at>2016-02-18 11:01:55 +0100
commit98cdf5c84739362a2d41702f538c370fa3d2c86e (patch)
tree41baa19e7b4503a6c53edf3ecbeca5d2ac015ad0 /id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/ProtocolFinalizationController.java
parent89dc33e5d6053af56a6d2cb11271ab092ced7dc3 (diff)
downloadmoa-id-spss-98cdf5c84739362a2d41702f538c370fa3d2c86e.tar.gz
moa-id-spss-98cdf5c84739362a2d41702f538c370fa3d2c86e.tar.bz2
moa-id-spss-98cdf5c84739362a2d41702f538c370fa3d2c86e.zip
update error handling and Web based error messages
Diffstat (limited to 'id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/ProtocolFinalizationController.java')
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/ProtocolFinalizationController.java20
1 files changed, 11 insertions, 9 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/ProtocolFinalizationController.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/ProtocolFinalizationController.java
index ed53d1a20..107212c38 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/ProtocolFinalizationController.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/ProtocolFinalizationController.java
@@ -90,27 +90,28 @@ public class ProtocolFinalizationController extends AbstractProtocolModulControl
return;
} else {
- handleErrorNoRedirect(throwable, req, resp);
+ handleErrorNoRedirect(throwable, req, resp, true);
}
} else {
handleErrorNoRedirect(new Exception(
MOAIDMessageProvider.getInstance().getMessage("auth.26", null)),
- req, resp);
+ req, resp, false);
}
} catch (Throwable e) {
- Logger.error(e);
- handleErrorNoRedirect(e, req, resp);
+ Logger.error(e);
+
+ handleErrorNoRedirect(e, req, resp, false);
}
-
+
// receive a pending request
} else {
if (pendingReq == null) {
Logger.error("No PendingRequest with ID " + pendingRequestID + " found.!");
- handleErrorNoRedirect(new MOAIDException("auth.28", new Object[]{pendingRequestID}), req, resp);
+ handleErrorNoRedirect(new MOAIDException("auth.28", new Object[]{pendingRequestID}), req, resp, false);
return;
}
@@ -130,7 +131,7 @@ public class ProtocolFinalizationController extends AbstractProtocolModulControl
AuthenticationSession moaSession = authenticatedSessionStorage.getSession(sessionID);
if (moaSession == null) {
Logger.error("No MOASession with ID " + sessionID + " found.!");
- handleErrorNoRedirect(new MOAIDException("auth.02", new Object[]{sessionID}), req, resp);
+ handleErrorNoRedirect(new MOAIDException("auth.02", new Object[]{sessionID}), req, resp, true);
return;
}
@@ -141,7 +142,7 @@ public class ProtocolFinalizationController extends AbstractProtocolModulControl
} else {
Logger.error("MOASession oder Pending-Request are not authenticated --> Abort authentication process!");
- handleErrorNoRedirect(new MOAIDException("auth.20", null), req, resp);
+ handleErrorNoRedirect(new MOAIDException("auth.20", null), req, resp, true);
return;
}
@@ -154,7 +155,8 @@ public class ProtocolFinalizationController extends AbstractProtocolModulControl
}
//remove pending-request
- requestStorage.removePendingRequest(pendingRequestID);
+ if (pendingReq != null)
+ requestStorage.removePendingRequest(pendingReq.getRequestID());
}