summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Lenz <thomas.lenz@egiz.gv.at>2018-07-19 09:35:41 +0200
committerThomas Lenz <thomas.lenz@egiz.gv.at>2018-07-19 09:35:41 +0200
commit41ee559d1aafc2eab6f4f9a339ff8b6ca9970c18 (patch)
tree8217d12374aa18b7445662b5978f096a48427b8c
parent56e257ffc694f7968b324e6ed868989c24dc2622 (diff)
downloadEAAF-Components-41ee559d1aafc2eab6f4f9a339ff8b6ca9970c18.tar.gz
EAAF-Components-41ee559d1aafc2eab6f4f9a339ff8b6ca9970c18.tar.bz2
EAAF-Components-41ee559d1aafc2eab6f4f9a339ff8b6ca9970c18.zip
change order of bPK generation strategies
-rw-r--r--eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/builder/AbstractAuthenticationDataBuilder.java26
1 files changed, 13 insertions, 13 deletions
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/builder/AbstractAuthenticationDataBuilder.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/builder/AbstractAuthenticationDataBuilder.java
index c095135d..ad01a796 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/builder/AbstractAuthenticationDataBuilder.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/builder/AbstractAuthenticationDataBuilder.java
@@ -232,32 +232,32 @@ public abstract class AbstractAuthenticationDataBuilder implements IAuthenticati
}
- // baseID is in MOASesson --> calculate bPK directly
- if (StringUtils.isNotEmpty(authData.getIdentificationValue())) {
- log.debug("Citizen baseID is in MOASession --> calculate bPK from this.");
- Pair<String, String> result = buildOAspecificbPK(pendingReq, authData);
- authData.setBPK(result.getFirst());
- authData.setBPKType(result.getSecond());
-
- //check if bPK already added to AuthData matches OA
- } else if (StringUtils.isNotEmpty(authData.getBPK())
+ //check if bPK already added to AuthData matches OA
+ if (StringUtils.isNotEmpty(authData.getBPK())
&& matchsReceivedbPKToOnlineApplication(pendingReq.getServiceProviderConfiguration(), authData.getBPKType()) ) {
log.debug("Correct bPK is already included in AuthData.");
- //check if bPK received by PVP-Attribute matches OA
+ //check if bPK received by PVP-Attribute matches OA
} else if (StringUtils.isNotEmpty(pvpbPKValue) &&
matchsReceivedbPKToOnlineApplication(pendingReq.getServiceProviderConfiguration(), pvpbPKTypeAttr)) {
log.debug("Receive correct bPK from PVP-Attribute");
authData.setBPK(pvpbPKValue);
authData.setBPKType(pvpbPKTypeAttr);
-
- //check if decrypted bPK exists
+
+ // baseID is in AuthSesson --> calculate bPK directly
+ } else if (StringUtils.isNotEmpty(authData.getIdentificationValue())) {
+ log.debug("Citizen baseID is in MOASession --> calculate bPK from this.");
+ Pair<String, String> result = buildOAspecificbPK(pendingReq, authData);
+ authData.setBPK(result.getFirst());
+ authData.setBPKType(result.getSecond());
+
+ //check if decrypted bPK exists
} else if (pvpEncbPKAttr != null) {
log.debug("Receive bPK as encrypted bPK and decryption was possible.");
authData.setBPK(pvpEncbPKAttr.getFirst());
authData.setBPKType(pvpEncbPKAttr.getSecond());
- //ask SZR to get bPK
+ //ask SZR to get bPK
} else {
String notValidbPK = authData.getBPK();
String notValidbPKType = authData.getBPKType();