summaryrefslogtreecommitdiff
path: root/pdf-over-gui/src/main
diff options
context:
space:
mode:
authortkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7>2013-04-10 19:33:44 +0000
committertkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7>2013-04-10 19:33:44 +0000
commit2717f5698bdbbbe7889ebea533cf2d187c8ccd44 (patch)
tree704a1cba34bb7850a6a8e6ac527663c0b9661343 /pdf-over-gui/src/main
parent92d13df5691387a2301c41eed4626f9efc025d43 (diff)
downloadpdf-over-2717f5698bdbbbe7889ebea533cf2d187c8ccd44.tar.gz
pdf-over-2717f5698bdbbbe7889ebea533cf2d187c8ccd44.tar.bz2
pdf-over-2717f5698bdbbbe7889ebea533cf2d187c8ccd44.zip
Ensure session ID on redirects (if necessary)
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@382 174cde9d-5d70-4d2a-aa98-46368bc2aaf7
Diffstat (limited to 'pdf-over-gui/src/main')
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/AbstractMobileBKUStatusImpl.java5
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/MobileBKUHandler.java2
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/MobileBKUStatus.java7
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/PostTanThread.java2
4 files changed, 15 insertions, 1 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/AbstractMobileBKUStatusImpl.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/AbstractMobileBKUStatusImpl.java
index deb7b16a..37b99fba 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/AbstractMobileBKUStatusImpl.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/AbstractMobileBKUStatusImpl.java
@@ -130,4 +130,9 @@ public abstract class AbstractMobileBKUStatusImpl implements MobileBKUStatus {
public void setSignatureDataURL(String signatureDataURL) {
this.signatureDataURL = signatureDataURL;
}
+
+ @Override
+ public String ensureSessionID(String url) {
+ return url;
+ }
} \ No newline at end of file
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/MobileBKUHandler.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/MobileBKUHandler.java
index 1193ffcd..e65f2fb9 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/MobileBKUHandler.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/MobileBKUHandler.java
@@ -258,6 +258,8 @@ public abstract class MobileBKUHandler {
}
if (redirectLocation != null) {
+ redirectLocation = getStatus().ensureSessionID(redirectLocation);
+ log.debug("Redirected to " + redirectLocation); //$NON-NLS-1$
get = new GetMethod(redirectLocation);
get.setFollowRedirects(true);
returnCode = client.executeMethod(get);
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/MobileBKUStatus.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/MobileBKUStatus.java
index 2c1367bc..7ebf7b3e 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/MobileBKUStatus.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/MobileBKUStatus.java
@@ -130,4 +130,11 @@ public interface MobileBKUStatus {
* @param signatureDataURL the signature data URL
*/
public void setSignatureDataURL(String signatureDataURL);
+
+ /**
+ * Ensure that given URL contains a session ID (if necessary)
+ * @param url URL to check for session ID
+ * @return resulting URL
+ */
+ public String ensureSessionID(String url);
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/PostTanThread.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/PostTanThread.java
index 0774cf7a..95ee0dbd 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/PostTanThread.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/PostTanThread.java
@@ -56,7 +56,7 @@ public class PostTanThread implements Runnable {
String responseData = this.handler.postTAN();
// Now we have received some data lets check it:
- log.debug("Response from A-Trust: " + responseData); //$NON-NLS-1$
+ log.debug("Response from mobile BKU: " + responseData); //$NON-NLS-1$
this.handler.handleTANResponse(responseData);