Commit ca539a00 authored by Tobias Wich's avatar Tobias Wich
Browse files

Return Disp.TIMEOUT when EAC processing hits th 120 sec timeout

parent 283db4f4
...@@ -549,6 +549,7 @@ public class TCTokenHandler { ...@@ -549,6 +549,7 @@ public class TCTokenHandler {
private String createResponseFromWsEx(WSException ex, TCTokenResponse response) { private String createResponseFromWsEx(WSException ex, TCTokenResponse response) {
String errorMsg; String errorMsg;
switch (ex.getResultMinor()) { switch (ex.getResultMinor()) {
case ECardConstants.Minor.Disp.TIMEOUT:
case ECardConstants.Minor.SAL.CANCELLATION_BY_USER: case ECardConstants.Minor.SAL.CANCELLATION_BY_USER:
case ECardConstants.Minor.IFD.CANCELLATION_BY_USER: case ECardConstants.Minor.IFD.CANCELLATION_BY_USER:
errorMsg = LANG_TOKEN.translationForKey("cancel"); errorMsg = LANG_TOKEN.translationForKey("cancel");
......
...@@ -299,6 +299,7 @@ public class PACEStep implements ProtocolStep<DIDAuthenticate, DIDAuthenticateRe ...@@ -299,6 +299,7 @@ public class PACEStep implements ProtocolStep<DIDAuthenticate, DIDAuthenticateRe
switch (minor) { switch (minor) {
case ECardConstants.Minor.IFD.CANCELLATION_BY_USER: case ECardConstants.Minor.IFD.CANCELLATION_BY_USER:
case ECardConstants.Minor.SAL.CANCELLATION_BY_USER: case ECardConstants.Minor.SAL.CANCELLATION_BY_USER:
case ECardConstants.Minor.Disp.TIMEOUT:
needsTermination = true; needsTermination = true;
} }
} }
......
...@@ -72,7 +72,7 @@ public class ProcessingStepAction extends StepAction { ...@@ -72,7 +72,7 @@ public class ProcessingStepAction extends StepAction {
} catch (TimeoutException ex) { } catch (TimeoutException ex) {
LOG.info("Timeout while waiting for the authentication to finish.", ex); LOG.info("Timeout while waiting for the authentication to finish.", ex);
ctx.put(EACProtocol.PACE_EXCEPTION, WSHelper.createException(WSHelper.makeResultError( ctx.put(EACProtocol.PACE_EXCEPTION, WSHelper.createException(WSHelper.makeResultError(
ECardConstants.Minor.SAL.CANCELLATION_BY_USER, "User canceled the EAC dialog."))); ECardConstants.Minor.Disp.TIMEOUT, "Timeout during EAC process.")));
return new StepActionResult(StepActionResultStatus.CANCEL); return new StepActionResult(StepActionResultStatus.CANCEL);
} }
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment