diff options
author | Andreas Abraham <andreas.abraham@egiz.gv.at> | 2019-11-04 15:41:43 +0100 |
---|---|---|
committer | Andreas Abraham <andreas.abraham@egiz.gv.at> | 2019-11-04 15:41:43 +0100 |
commit | 2e542bf894651cd02a38f28215e7a11c0c018b7a (patch) | |
tree | 4117e6910de07e5690fb3b6e4082f2f4cf45a155 /pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku | |
parent | b8eae80f420f8bf97f45a78df521d60960a8ffdb (diff) | |
download | pdf-over-2e542bf894651cd02a38f28215e7a11c0c018b7a.tar.gz pdf-over-2e542bf894651cd02a38f28215e7a11c0c018b7a.tar.bz2 pdf-over-2e542bf894651cd02a38f28215e7a11c0c018b7a.zip |
request sms tan in waiting screen
Diffstat (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku')
3 files changed, 46 insertions, 3 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/MobileBKUConnector.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/MobileBKUConnector.java index a67ea019..19def107 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/MobileBKUConnector.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/MobileBKUConnector.java @@ -94,8 +94,20 @@ public class MobileBKUConnector implements BkuSlConnector { if (responseData.contains("undecided.aspx?sid=")) { //$NON-NLS-1$
// handle polling
- this.state.showOpenAppMessage();
- handler.handlePolling(responseData);
+ //this.state.showOpenAppMessage();
+ this.state.showOpenAppMessageWithSMSandCancel();
+
+ if (((ATrustStatus) this.state.getStatus()).isSmsTan()) {
+ //((ATrustStatus)this.state.getStatus()).setSmsTan(false);
+ ATrustHandler aHandler = (ATrustHandler) handler;
+ String response = aHandler.postSMSRequest();
+ aHandler.handleCredentialsResponse(response);
+ ((ATrustStatus)this.state.getStatus()).setIsAPPTan("sms"); //$NON-NLS-1$
+ this.state.checkTAN();
+ } else {
+ handler.handlePolling(responseData);
+ }
+
} else {
@@ -146,7 +158,7 @@ public class MobileBKUConnector implements BkuSlConnector { enterTAN = false;
}
}
- if (enterTAN && !aStatus.getTanField()) {
+ if (enterTAN && !aStatus.getTanField() && !aStatus.isSmsTan()) {
try {
this.state.showFingerPrintInformation();
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/ATrustHandler.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/ATrustHandler.java index e95121b2..2c6f0e55 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/ATrustHandler.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/ATrustHandler.java @@ -444,6 +444,22 @@ public class ATrustHandler extends MobileBKUHandler { return executeGet(client, get);
}
+
+ /**
+ * @param responseData
+ * @return a boolean
+ */
+ public Boolean handleWaitforAppResponse(String responseData) {
+
+ getStatus().setErrorMessage(null);
+ if (!responseData.contains("Bitte starten Sie Ihre")) { //$NON-NLS-1$
+ //getSigningState().setSignatureResponse(
+ // new SLResponse(responseData, getStatus().getServer(), null, null));
+ return true;
+
+ }
+ return false;
+ }
/**
* Parse QR code response
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/ATrustStatus.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/ATrustStatus.java index b34322b8..4c8b42e8 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/ATrustStatus.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/ATrustStatus.java @@ -47,6 +47,7 @@ public class ATrustStatus extends AbstractMobileBKUStatusImpl { private String dynAttrBtnId;
private String dynAttrTan;
private String dynAttrSignButton;
+ private boolean smsTan = false;
/**
* Constructor
@@ -240,4 +241,18 @@ public class ATrustStatus extends AbstractMobileBKUStatusImpl { this.dynAttrSignButton = dynAttrSignButton;
}
+ /**
+ * @return the smsTan
+ */
+ public boolean isSmsTan() {
+ return smsTan;
+ }
+
+ /**
+ * @param smsTan the smsTan to set
+ */
+ public void setSmsTan(boolean smsTan) {
+ this.smsTan = smsTan;
+ }
+
}
|