summaryrefslogtreecommitdiff
path: root/BKUApplet/src/main/java/at/gv
diff options
context:
space:
mode:
authorclemenso <clemenso@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2009-01-22 13:48:33 +0000
committerclemenso <clemenso@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2009-01-22 13:48:33 +0000
commit2d66c2f9ea2efd596287ad1be61e89d5bc1f1da9 (patch)
tree47312d1104cad3c2a9bb15c51646f6f1ad156b61 /BKUApplet/src/main/java/at/gv
parent212bbffc24ccc1cd909cabdc9650491dd221cd60 (diff)
downloadmocca-2d66c2f9ea2efd596287ad1be61e89d5bc1f1da9.tar.gz
mocca-2d66c2f9ea2efd596287ad1be61e89d5bc1f1da9.tar.bz2
mocca-2d66c2f9ea2efd596287ad1be61e89d5bc1f1da9.zip
STALTranslator
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@284 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'BKUApplet/src/main/java/at/gv')
-rw-r--r--BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/AppletBKUWorker.java21
1 files changed, 12 insertions, 9 deletions
diff --git a/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/AppletBKUWorker.java b/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/AppletBKUWorker.java
index 3b6d007a..6ac892ec 100644
--- a/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/AppletBKUWorker.java
+++ b/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/AppletBKUWorker.java
@@ -133,16 +133,14 @@ public class AppletBKUWorker extends AbstractBKUWorker implements Runnable {
} catch (RuntimeException ex) {
// return ErrorResponse to server, which displays error page
log.error(ex.getMessage());
- Throwable cause = ex.getCause();
ErrorResponseType err = stalObjFactory.createErrorResponseType();
- if (cause != null) {
- log.error("caused by: " + cause.getMessage());
- if (cause instanceof SecurityException) {
- err.setErrorCode(6002);
- } else {
- err.setErrorCode(4000);
- }
+ if (ex instanceof SecurityException) {
+ err.setErrorCode(6002);
} else {
+ Throwable cause = ex.getCause();
+ if (cause != null) {
+ log.error("caused by: " + cause.getMessage());
+ }
err.setErrorCode(4000);
}
responses.clear();
@@ -189,6 +187,11 @@ public class AppletBKUWorker extends AbstractBKUWorker implements Runnable {
sendRedirect();
}
+ /**
+ * throws RuntimeException if requests contain InfoboxReadRequest for IdentityLink
+ * and STAL Service Endpoint is no e-Gov agency
+ * @param stalRequests
+ */
private void checkPermission(List<STALRequest> stalRequests) {
for (STALRequest request : stalRequests) {
if (request instanceof at.gv.egiz.stal.InfoboxReadRequest) {
@@ -197,7 +200,7 @@ public class AppletBKUWorker extends AbstractBKUWorker implements Runnable {
String domainId = r.getDomainIdentifier();
if ("IdentityLink".equals(infoboxId) && domainId == null) {
if (!InternalSSLSocketFactory.getInstance().isEgovAgency()) {
- throw new RuntimeException(new SecurityException("Insufficient rights to execute command InfoboxReadRequest for Infobox IdentityLink"));
+ throw new SecurityException("Insufficient rights to execute command InfoboxReadRequest for Infobox IdentityLink");
}
}
}