summaryrefslogtreecommitdiff
path: root/pdf-over-gui/src
diff options
context:
space:
mode:
authorAndreas Abraham <andreas.abraham@egiz.gv.at>2019-08-01 16:21:43 +0200
committerAndreas Abraham <andreas.abraham@egiz.gv.at>2019-08-01 16:21:43 +0200
commit590b43af95dad54693ecb616d579c30ad5a3bf7c (patch)
tree3898cb68fbaa163b5edbe1865f9b7d661bb3cd30 /pdf-over-gui/src
parent562b38f66da0dbe67f8cff9c02165ca89434d171 (diff)
downloadpdf-over-590b43af95dad54693ecb616d579c30ad5a3bf7c.tar.gz
pdf-over-590b43af95dad54693ecb616d579c30ad5a3bf7c.tar.bz2
pdf-over-590b43af95dad54693ecb616d579c30ad5a3bf7c.zip
ready for testing
Diffstat (limited to 'pdf-over-gui/src')
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java4
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/MobileBKUConnector.java2
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/WaitingForAppComposite.java44
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/MobileBKUState.java47
-rw-r--r--pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties3
5 files changed, 52 insertions, 48 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java
index 1f6af7bc..129c8aee 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java
@@ -84,8 +84,8 @@ public class Constants {
public static final String LOCAL_BKU_URL = "http://127.0.0.1:3495/http-security-layer-request"; //$NON-NLS-1$
/** Default Mobile BKU URL */
- public static final String DEFAULT_MOBILE_BKU_URL = "https://test1.a-trust.at/mobile2/https-security-layer-request/default.aspx";//"https://www.a-trust.at/mobile/https-security-layer-request/default.aspx"; //$NON-NLS-1$
- //public static final String DEFAULT_MOBILE_BKU_URL = "https://www.a-trust.at/mobile/https-security-layer-request/default.aspx"; //$NON-NLS-1$
+ //public static final String DEFAULT_MOBILE_BKU_URL = "https://test1.a-trust.at/mobile2/https-security-layer-request/default.aspx";//"https://www.a-trust.at/mobile/https-security-layer-request/default.aspx"; //$NON-NLS-1$
+ public static final String DEFAULT_MOBILE_BKU_URL = "https://www.a-trust.at/mobile/https-security-layer-request/default.aspx"; //$NON-NLS-1$
/** Default Mobile BKU type */
public static final MobileBKUs DEFAULT_MOBILE_BKU_TYPE = MobileBKUs.A_TRUST;
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 3b6eec31..ba59d16a 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
@@ -97,7 +97,6 @@ public class MobileBKUConnector implements BkuSlConnector {
this.state.showOpenAppMessage();
handler.handlePolling(responseData);
-
} else {
// Now we have received some data lets check it:
@@ -149,6 +148,7 @@ public class MobileBKUConnector implements BkuSlConnector {
}
if (enterTAN && !aStatus.getTanField()) {
try {
+
this.state.showFingerPrintInformation();
if (this.state.getStatus().getErrorMessage() != null &&
this.state.getStatus().getErrorMessage().equals("cancel")) //$NON-NLS-1$
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/WaitingForAppComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/WaitingForAppComposite.java
index 80bfe46c..360786d4 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/WaitingForAppComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/WaitingForAppComposite.java
@@ -18,16 +18,12 @@ package at.asit.pdfover.gui.composites;
// Imports
import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.layout.FormAttachment;
import org.eclipse.swt.layout.FormData;
import org.eclipse.swt.layout.FormLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.ProgressBar;
-import org.eclipse.swt.widgets.Button;
-
import at.asit.pdfover.gui.utils.Messages;
import at.asit.pdfover.gui.workflow.states.State;
@@ -36,37 +32,6 @@ import at.asit.pdfover.gui.workflow.states.State;
*/
public class WaitingForAppComposite extends StateComposite {
private Label lbl_description;
- private Button btnRequestSms;
- private boolean userSms;
-
- /**
- *
- */
- private final class SMSSelectionListener extends SelectionAdapter {
- /**
- * Empty constructor
- */
- public SMSSelectionListener() {
- }
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- if(!WaitingForAppComposite.this.btnRequestSms.getEnabled()) {
- return;
- }
-
- WaitingForAppComposite.this.setUserSMS(true);
- WaitingForAppComposite.this.btnRequestSms.setEnabled(false);
- }
- }
-
- public void setUserSMS(boolean bool ) {
- this.userSms = bool;
- }
-
- public boolean getUserSMS() {
- return this.userSms;
- }
/**
* Create the composite.
@@ -95,14 +60,6 @@ public class WaitingForAppComposite extends StateComposite {
fd_progressBar.right = new FormAttachment(50, +100);
progressBar.setLayoutData(fd_progressBar);
-
- this.btnRequestSms = new Button(this, SWT.NONE);
- FormData fd_btnRequestSms = new FormData();
- fd_btnRequestSms.top = new FormAttachment(progressBar, 23);
- fd_btnRequestSms.right = new FormAttachment(100, -123);
- this.btnRequestSms.setLayoutData(fd_btnRequestSms);
- this.btnRequestSms.setText(Messages.getString("WaitingForAppComposite.btnRequestSms.text")); //$NON-NLS-1$
- this.btnRequestSms.addSelectionListener(new SMSSelectionListener());
reloadResources();
}
@@ -126,6 +83,5 @@ public class WaitingForAppComposite extends StateComposite {
@Override
public void reloadResources() {
this.lbl_description.setText(Messages.getString("waiting_for_app.message")); //$NON-NLS-1$
- this.btnRequestSms.setText(Messages.getString("tanEnter.SMS")); //$NON-NLS-1$
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/MobileBKUState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/MobileBKUState.java
index f086f3cd..9d2fb32f 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/MobileBKUState.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/MobileBKUState.java
@@ -442,7 +442,52 @@ public class MobileBKUState extends State {
getStateMachine().getGUIProvider().display(MobileBKUState.this.getWaitingForAppComposite());
}
});
+
}
+
+// /**
+// *
+// */
+// public void showOpenAppMessageWithSMSandCancel() {
+//
+// final ATrustStatus status = (ATrustStatus) this.getStatus();
+// final ATrustHandler handler = (ATrustHandler) this.getHandler();
+//
+// Display.getDefault().syncExec(new Runnable() {
+// @Override
+// public void run() {
+// WaitingForAppComposite waitingForAppcomposite = getWaitingForAppComposite();
+// getStateMachine().getGUIProvider().display(waitingForAppcomposite);
+//
+// Display display = getStateMachine().getGUIProvider().getMainShell().getDisplay();
+// while (!waitingForAppcomposite.getUserCancel() && !waitingForAppcomposite.getUserSMS() && !waitingForAppcomposite.getDone()) {
+// if (!display.readAndDispatch()) {
+// display.sleep();
+// }
+// }
+//
+// if (waitingForAppcomposite.getUserCancel()) {
+// waitingForAppcomposite.setUserCancel(false);
+// status.setErrorMessage("cancel"); //$NON-NLS-1$
+// return;
+// }
+//
+// if (waitingForAppcomposite.getUserSMS()) {
+// status.setQRCode(null);
+// status.setErrorMessage(null);
+// return;
+//
+// }
+//
+// if (waitingForAppcomposite.getDone())
+// waitingForAppcomposite.setDone(false);
+//
+// // show waiting composite
+// getStateMachine().getGUIProvider().display(
+// MobileBKUState.this.getWaitingComposite());
+// }
+// });
+// }
/**
* when fingerprint or faceid is selected in the app
@@ -570,6 +615,8 @@ public class MobileBKUState extends State {
this.mobileBKUEnterTANComposite.dispose();
if (this.waitingComposite != null)
this.waitingComposite.dispose();
+ if (this.waitingForAppComposite != null)
+ this.waitingForAppComposite.dispose();
}
/*
diff --git a/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties b/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties
index bbab39e6..4e0d101b 100644
--- a/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties
+++ b/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties
@@ -1,11 +1,12 @@
#Eclipse messages class
-#Wed Jul 31 17:09:42 CEST 2019
+#Thu Aug 01 14:54:36 CEST 2019
BKU.KS=Keystore
BKU.LOCAL=Local CCE
BKU.MOBILE=Mobile CCE
BKU.NONE=no default
BKUSelectionComposite.btnMobile.text=MOBILE
TrustedSocketFactory.FailedToCreateSecureConnection=Failed to create secure network connection
+WaitingForAppComposite.btnCancel_1.text=Cancel
WaitingForAppComposite.btnRequestSms.text=Request SMS
WaitingForAppComposite.lblNewLabel.text=New Label
advanced_config.AutoPosition=Automatic positioning