aboutsummaryrefslogtreecommitdiff
path: root/id/server/idserverlib
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2020-01-15 14:20:13 +0100
committerThomas Lenz <tlenz@iaik.tugraz.at>2020-01-15 14:20:13 +0100
commit70262ef097d022fa2c8cb8f7f95362b52e394b8c (patch)
tree65edf7391a0f31599401f4abf65027556f9f4de2 /id/server/idserverlib
parenta089efceed88185050b920d361469836ec4d4c12 (diff)
downloadmoa-id-spss-70262ef097d022fa2c8cb8f7f95362b52e394b8c.tar.gz
moa-id-spss-70262ef097d022fa2c8cb8f7f95362b52e394b8c.tar.bz2
moa-id-spss-70262ef097d022fa2c8cb8f7f95362b52e394b8c.zip
fix possible error in E-ID Proxy mode
Diffstat (limited to 'id/server/idserverlib')
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/AuthenticationDataBuilder.java36
1 files changed, 24 insertions, 12 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/AuthenticationDataBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/AuthenticationDataBuilder.java
index 085874e77..6a01bd1fb 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/AuthenticationDataBuilder.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/AuthenticationDataBuilder.java
@@ -912,18 +912,30 @@ public class AuthenticationDataBuilder extends AbstractAuthenticationDataBuilder
private void generateAdditonalbPK(MOAAuthenticationData authData, List<String> additionalbPKSectorsRequested) throws EAAFBuilderException {
if (additionalbPKSectorsRequested != null && !additionalbPKSectorsRequested.isEmpty()) {
- Logger.debug("Sectors for foreign bPKs are configurated. Starting foreign bPK generation ... ");
- for (String sector : additionalbPKSectorsRequested) {
- Logger.trace("Process sector: " + sector + " ... ");
- Pair<String, String> bpk = new BPKBuilder().generateAreaSpecificPersonIdentifier(
- authData.getIdentificationValue(),
- authData.getIdentificationType(),
- sector);
-
- Logger.trace("Calculate additional bPK for sector: " + bpk.getSecond() + " with value: " + bpk.getFirst() );
- authData.addAdditionalbPKPair(bpk);
-
- }
+ Logger.debug("Sectors for foreign bPKs are configurated. Starting foreign bPK generation ... ");
+
+ try {
+ for (String sector : additionalbPKSectorsRequested) {
+ Logger.trace("Process sector: " + sector + " ... ");
+ Pair<String, String> bpk = new BPKBuilder().generateAreaSpecificPersonIdentifier(
+ authData.getIdentificationValue(),
+ authData.getIdentificationType(),
+ sector);
+
+ Logger.trace("Calculate additional bPK for sector: " + bpk.getSecond() + " with value: " + bpk.getFirst() );
+ authData.addAdditionalbPKPair(bpk);
+
+ }
+
+ } catch (Exception e) {
+ Logger.warn("Can NOT generate additional bPKs. Reason: " + e.getMessage());
+
+ if (Logger.isDebugEnabled()) {
+ Logger.warn("StackTrace: ", e);
+
+ }
+
+ }
}
}
@Override