aboutsummaryrefslogtreecommitdiff
path: root/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific
diff options
context:
space:
mode:
authorThomas <>2022-02-08 16:31:08 +0100
committerThomas <>2022-02-08 16:31:08 +0100
commite3eae0a6f822d66f33c1a32459dd4ba3cfc76852 (patch)
treeb2b78f2704151ed22e4ec39cce29fee18dacabbd /eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific
parent1d0bed25b6edf315c6a05573629d727f54ef85ac (diff)
downloadNational_eIDAS_Gateway-e3eae0a6f822d66f33c1a32459dd4ba3cfc76852.tar.gz
National_eIDAS_Gateway-e3eae0a6f822d66f33c1a32459dd4ba3cfc76852.tar.bz2
National_eIDAS_Gateway-e3eae0a6f822d66f33c1a32459dd4ba3cfc76852.zip
chore(matching): update matching by 'ID Austria login' to forward user to 'otherLoginMethod' GUI in case of an error
Diffstat (limited to 'eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific')
-rw-r--r--eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/ReceiveMobilePhoneSignatureResponseTask.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/ReceiveMobilePhoneSignatureResponseTask.java b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/ReceiveMobilePhoneSignatureResponseTask.java
index 3e57ea24..2d28709b 100644
--- a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/ReceiveMobilePhoneSignatureResponseTask.java
+++ b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/ReceiveMobilePhoneSignatureResponseTask.java
@@ -24,6 +24,7 @@
package at.asitplus.eidas.specific.modules.auth.eidas.v2.tasks;
import static at.asitplus.eidas.specific.modules.auth.eidas.v2.Constants.CONTEXT_FLAG_ADVANCED_MATCHING_FAILED;
+import static at.asitplus.eidas.specific.modules.auth.eidas.v2.Constants.CONTEXT_FLAG_ADVANCED_MATCHING_FAILED_REASON;
import static at.asitplus.eidas.specific.modules.auth.eidas.v2.Constants.TRANSITION_TO_GENERATE_OTHER_LOGIN_METHOD_GUI_TASK;
import static at.asitplus.eidas.specific.modules.auth.eidas.v2.idaustriaclient.IdAustriaClientAuthConstants.MODULE_NAME_FOR_LOGGING;
@@ -127,6 +128,9 @@ public class ReceiveMobilePhoneSignatureResponseTask extends AbstractAuthServlet
private static final String ERROR_MSG_02 = "PVP response decryption FAILED. No credential found.";
private static final String ERROR_MSG_03 = "PVP response validation FAILED.";
+ private static final String MSG_PROP_23 = "module.eidasauth.matching.23";
+ private static final String MSG_PROP_24 = "module.eidasauth.matching.24";
+
/**
* Creates the new task, with autowired dependencies from Spring.
*/
@@ -152,7 +156,9 @@ public class ReceiveMobilePhoneSignatureResponseTask extends AbstractAuthServlet
Pair<PvpSProfileResponse, Boolean> processedMsg = validateAssertion((PvpSProfileResponse) inboundMessage);
if (processedMsg.getSecond()) {
// forward to next matching step in case of ID Autria authentication was stopped by user
- executionContext.put(Constants.TRANSITION_TO_GENERATE_GUI_QUERY_AUSTRIAN_RESIDENCE_TASK, true);
+ executionContext.put(Constants.TRANSITION_TO_GENERATE_OTHER_LOGIN_METHOD_GUI_TASK, true);
+ executionContext.put(CONTEXT_FLAG_ADVANCED_MATCHING_FAILED_REASON, MSG_PROP_23);
+ executionContext.put(CONTEXT_FLAG_ADVANCED_MATCHING_FAILED, true);
return;
}
@@ -171,8 +177,9 @@ public class ReceiveMobilePhoneSignatureResponseTask extends AbstractAuthServlet
// check if MDS from ID Austria authentication matchs to eIDAS authentication
if (!simpleMobileSignatureData.equalsSimpleEidasData(eidasData)) {
- executionContext.put(CONTEXT_FLAG_ADVANCED_MATCHING_FAILED, true);
executionContext.put(TRANSITION_TO_GENERATE_OTHER_LOGIN_METHOD_GUI_TASK, true);
+ executionContext.put(CONTEXT_FLAG_ADVANCED_MATCHING_FAILED_REASON, MSG_PROP_24);
+ executionContext.put(CONTEXT_FLAG_ADVANCED_MATCHING_FAILED, true);
return;
}