From 8788ba6e3444b857c9a1785be07b1fdd867ed6fc Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Wed, 22 Apr 2020 18:42:09 +0200 Subject: update log messages and pendingRequest clean-up in finalization step --- .../eaaf/core/impl/idp/auth/RequestStorage.java | 2 +- .../services/ProtocolAuthenticationService.java | 22 ++++++++-------------- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/RequestStorage.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/RequestStorage.java index 0834aa7c..48c9d1bd 100644 --- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/RequestStorage.java +++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/RequestStorage.java @@ -213,7 +213,7 @@ public class RequestStorage implements IRequestStorage { throws EaafException { final IRequest pendingRequest = transactionStorage.get(internalPendingReqId, IRequest.class); if (pendingRequest == null) { - log.info("No PendingRequst found with pendingRequestID " + internalPendingReqId); + log.debug("No PendingRequst found with pendingRequestID " + internalPendingReqId); return null; } diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/services/ProtocolAuthenticationService.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/services/ProtocolAuthenticationService.java index 5f84d118..fbf19429 100644 --- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/services/ProtocolAuthenticationService.java +++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/services/ProtocolAuthenticationService.java @@ -181,13 +181,6 @@ public class ProtocolAuthenticationService implements IProtocolAuthenticationSer new Object[] {}), req, resp, pendingReq); - // do not remove the full active SSO-Session - // in case of only one Service-Provider authentication request is aborted - if (!pendingReq.needSingleSignOnFunctionality()) { - requestStorage.removePendingRequest(pendingReq.getPendingRequestId()); - - } - // check if pending-request are authenticated } else if (pendingReq.isAuthenticated() && !pendingReq.isNeedUserConsent()) { internalFinalizeAuthenticationProcess(req, resp, pendingReq); @@ -198,7 +191,8 @@ public class ProtocolAuthenticationService implements IProtocolAuthenticationSer pendingReq.isAuthenticated(), pendingReq.isNeedUserConsent()); if (pendingReq.isNeedUserConsent()) { log.error( - "PendingRequest NEEDS user-consent. Can NOT fininalize authentication --> Abort authentication process!"); + "PendingRequest NEEDS user-consent. " + + "Can NOT fininalize authentication --> Abort authentication process!"); } else { log.error("PendingRequest is NOT authenticated --> Abort authentication process!"); @@ -213,13 +207,13 @@ public class ProtocolAuthenticationService implements IProtocolAuthenticationSer log.error("Finalize authentication protocol FAILED.", e); buildProtocolSpecificErrorResponse(e, req, resp, pendingReq); + } finally { + // remove pending-request + requestStorage.removePendingRequest(pendingReq.getPendingRequestId()); + revisionsLogger.logEvent(EventConstants.TRANSACTION_DESTROYED, + pendingReq.getUniqueTransactionIdentifier()); } - - // remove pending-request - requestStorage.removePendingRequest(pendingReq.getPendingRequestId()); - revisionsLogger.logEvent(EventConstants.TRANSACTION_DESTROYED, - pendingReq.getUniqueTransactionIdentifier()); - + } @Override -- cgit v1.2.3