summaryrefslogtreecommitdiff
path: root/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/services/ProtocolAuthenticationService.java
diff options
context:
space:
mode:
Diffstat (limited to 'eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/services/ProtocolAuthenticationService.java')
-rw-r--r--eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/services/ProtocolAuthenticationService.java21
1 files changed, 16 insertions, 5 deletions
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 4b2cbd0e..635cfa0e 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
@@ -242,10 +242,21 @@ public class ProtocolAuthenticationService implements IProtocolAuthenticationSer
protocolRequest.getUniqueTransactionIdentifier());
if (ActionType.TICKET.equals(errorData.getActionType())) {
- // Put pending request
- final ExceptionContainer exceptionContainer = new ExceptionContainer(protocolRequest, throwable);
- final byte[] serialized = SerializationUtils.serialize(exceptionContainer);
- transactionStorage.put(errorData.getErrorIdTokenForRedirect(), serialized, -1);
+
+ if (errorData.getErrorIdTokenForRedirect() != null) {
+ // Put pending request
+ final ExceptionContainer exceptionContainer = new ExceptionContainer(protocolRequest, throwable);
+ final byte[] serialized = SerializationUtils.serialize(exceptionContainer);
+ log.debug("Put error into cache to support SP forwarding ... ");
+ String internalErrorToken = pendingReqIdGenerationStrategy.getPendingRequestIdWithOutChecks(
+ errorData.getErrorIdTokenForRedirect());
+ log.trace("errorIdToken: {}", internalErrorToken);
+ transactionStorage.put(internalErrorToken, serialized, -1);
+
+ } else {
+ log.debug("No errorTokenId. Forwarding to SP will not be available");
+
+ }
// render GUI
displayException(req, resp, errorData);
@@ -299,7 +310,7 @@ public class ProtocolAuthenticationService implements IProtocolAuthenticationSer
final HttpServletResponse resp, final boolean writeExceptionToStatisticLog) throws EaafException,
IOException {
- final IErrorService.IHandleData errorData = errorTicketService.createHandleData(throwable, true);
+ final IErrorService.IHandleData errorData = errorTicketService.createHandleData(throwable, false);
// log Exception into statistic database
if (writeExceptionToStatisticLog) {