aboutsummaryrefslogtreecommitdiff
path: root/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/storage/AuthenticationSessionStoreage.java
diff options
context:
space:
mode:
Diffstat (limited to 'id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/storage/AuthenticationSessionStoreage.java')
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/storage/AuthenticationSessionStoreage.java22
1 files changed, 16 insertions, 6 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/storage/AuthenticationSessionStoreage.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/storage/AuthenticationSessionStoreage.java
index a9f5ed60a..4288f48ad 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/storage/AuthenticationSessionStoreage.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/storage/AuthenticationSessionStoreage.java
@@ -48,6 +48,7 @@ import at.gv.egovernment.moa.id.config.auth.OAAuthParameter;
import at.gv.egovernment.moa.id.data.EncryptedData;
import at.gv.egovernment.moa.id.data.SLOInformationInterface;
import at.gv.egovernment.moa.id.moduls.IRequest;
+import at.gv.egovernment.moa.id.process.dao.ProcessInstanceStoreDAOImpl;
import at.gv.egovernment.moa.id.protocols.pvp2x.exceptions.AssertionAttributeExtractorExeption;
import at.gv.egovernment.moa.id.protocols.pvp2x.utils.AssertionAttributeExtractor;
import at.gv.egovernment.moa.id.util.Random;
@@ -912,19 +913,28 @@ public class AuthenticationSessionStoreage {
}
- private static void cleanDelete(AuthenticatedSessionStore result) {
+ private static void cleanDelete(AuthenticatedSessionStore result) {
+
+ try {
+ AuthenticationSession session = getSession(result.getSessionid());
+ if (session.getProcessInstanceId() != null) {
+ ProcessInstanceStoreDAOImpl.getInstance().remove(session.getProcessInstanceId());
+ }
+
+ } catch (MOADatabaseException e) {
+ Logger.warn("Removing process associated with moa session " + result.getSessionid() + " FAILED.", e);
+ }
+
try {
result.setSession("blank".getBytes());
MOASessionDBUtils.saveOrUpdate(result);
-
+
} catch (MOADatabaseException e) {
Logger.warn("Blank authenticated session with sessionID=" + result.getSessionid() + " FAILED.", e);
-
+
} finally {
if (!MOASessionDBUtils.delete(result))
- Logger.error("Authenticated session with sessionID=" + result.getSessionid()
- + " not removed! (Error during Database communication)");
-
+ Logger.error("Authenticated session with sessionID=" + result.getSessionid() + " not removed! (Error during Database communication)");
}
}