diff options
Diffstat (limited to 'eidas_modules/authmodule-eIDAS-v2/src/main')
8 files changed, 70 insertions, 63 deletions
diff --git a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/Constants.java b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/Constants.java index e7190ab4..c6d24e34 100644 --- a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/Constants.java +++ b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/Constants.java @@ -28,7 +28,7 @@ import at.gv.egiz.eaaf.core.api.data.EaafConstants; public class Constants { public static final String ERRORCODE_00 = "module.eidasauth.00"; - + public static final String DATA_REQUESTERID = "req_requesterId"; public static final String DATA_PROVIDERNAME = "req_providerName"; public static final String DATA_REQUESTED_LOA_LIST = "req_requestedLoA"; @@ -151,7 +151,7 @@ public class Constants { public static final String eIDAS_REQ_PARAM_SECTOR_PUBLIC = "public"; public static final String eIDAS_REQ_PARAM_SECTOR_PRIVATE = "private"; - + public static final String POLICY_DEFAULT_ALLOWED_TARGETS = EaafConstants.URN_PREFIX_CDID.replaceAll("\\.", "\\\\.").replaceAll("\\+", "\\\\+") + ".*"; @@ -184,9 +184,10 @@ public class Constants { public static final String COUNTRY_CODE_IT = "IT"; public static final String TRANSITION_TO_CREATE_NEW_ERNB_ENTRY_TASK = "TASK_CreateNewErnpEntryTask"; - public static final String TRANSITION_TO_CREATE_GENERATE_GUI_TASK = "TASK_GenerateGuiTask"; + public static final String TRANSITION_TO_GENERATE_OTHER_LOGIN_METHOD_GUI_TASK = + "TASK_GenerateOtherLoginMethodGuiTask"; public static final String TRANSITION_TO_GENERATE_GUI_QUERY_AUSTRIAN_RESIDENCE_TASK = - "Task_GenerateGuiQueryAustrianResidenceTask"; + "TASK_GenerateAustrianResidenceGuiTask"; public static final String TRANSITION_TO_GENERATE_MOBILE_PHONE_SIGNATURE_REQUEST_TASK = "TASK_GenerateMobilePhoneSignatureRequestTask"; public static final String TRANSITION_TO_GENERATE_EIDAS_LOGIN = "TASK_TODO"; diff --git a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/GenerateGuiQueryAustrianResidenceTask.java b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/GenerateAustrianResidenceGuiTask.java index 02f8c5b7..d8266398 100644 --- a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/GenerateGuiQueryAustrianResidenceTask.java +++ b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/GenerateAustrianResidenceGuiTask.java @@ -39,19 +39,18 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; /** - * Task that generates a GUI that queries whether the user has an addional eidas eID or an Austrian mobile phone - * signature. + * Show GUI where user can provide an Austrian residence address, to provide further input to match the identity. * - * @author amarsalek + * @author ckollmann */ @Slf4j -@Component("GenerateGuiQueryAustrianResidenceTask") -public class GenerateGuiQueryAustrianResidenceTask extends AbstractAuthServletTask { +@Component("GenerateAustrianResidenceGuiTask") +public class GenerateAustrianResidenceGuiTask extends AbstractAuthServletTask { @Autowired - ISpringMvcGuiFormBuilder guiBuilder; + private ISpringMvcGuiFormBuilder guiBuilder; @Autowired - IConfiguration basicConfig; + private IConfiguration basicConfig; @Override public void execute(ExecutionContext executionContext, HttpServletRequest request, HttpServletResponse response) diff --git a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/GenerateLoginMethodGuiTask.java b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/GenerateOtherLoginMethodGuiTask.java index 9c94b036..0236b9c2 100644 --- a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/GenerateLoginMethodGuiTask.java +++ b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/GenerateOtherLoginMethodGuiTask.java @@ -39,18 +39,19 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; /** - * Task that searches ErnB and ZMR before adding person to SZR. + * Task that provides GUI for user to select an alternative login method. + * This page is shown when the matching of the eIDAS data to ZMR/ERnP data is ambiguous * - * @author amarsalek + * @author ckollmann */ @Slf4j -@Component("GenerateGuiTask") -public class GenerateLoginMethodGuiTask extends AbstractAuthServletTask { +@Component("GenerateOtherLoginMethodGuiTask") +public class GenerateOtherLoginMethodGuiTask extends AbstractAuthServletTask { @Autowired - ISpringMvcGuiFormBuilder guiBuilder; + private ISpringMvcGuiFormBuilder guiBuilder; @Autowired - IConfiguration basicConfig; + private IConfiguration basicConfig; @Override public void execute(ExecutionContext executionContext, HttpServletRequest request, HttpServletResponse response) @@ -62,7 +63,7 @@ public class GenerateLoginMethodGuiTask extends AbstractAuthServletTask { basicConfig.getBasicConfiguration( MsEidasNodeConstants.PROP_CONFIG_WEBCONTENT_TEMPLATES_OTHER_LOGIN_METHOD_SELECTION, MsEidasNodeConstants.TEMPLATE_HTML_OTHERLOGINMETHODS), - MsEidasNodeConstants.ENDPOINT_OTHERLOGINMETHODSELECTION, + MsEidasNodeConstants.ENDPOINT_OTHER_LOGIN_METHOD_SELECTION, resourceLoader); guiBuilder.build(request, response, config, "Other login methods selection form"); diff --git a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/InitialSearchTask.java b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/InitialSearchTask.java index 2e754e14..554c60b6 100644 --- a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/InitialSearchTask.java +++ b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/InitialSearchTask.java @@ -209,9 +209,9 @@ public class InitialSearchTask extends AbstractAuthServletTask { if (mdsSearchResult.getResultCount() == 0) { executionContext.put(Constants.TRANSITION_TO_CREATE_NEW_ERNB_ENTRY_TASK, true); } else { - executionContext.put(Constants.TRANSITION_TO_CREATE_GENERATE_GUI_TASK, true); + executionContext.put(Constants.TRANSITION_TO_GENERATE_OTHER_LOGIN_METHOD_GUI_TASK, true); } - + // todo das suchergebnis auch noch speichern für später! //TODO implement next phase and return correct value return null; } diff --git a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/ReceiveGuiAustrianResidenceResponseTask.java b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/ReceiveAustrianResidenceGuiResponseTask.java index 977262bb..2020274a 100644 --- a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/ReceiveGuiAustrianResidenceResponseTask.java +++ b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/ReceiveAustrianResidenceGuiResponseTask.java @@ -40,13 +40,13 @@ import javax.servlet.http.HttpServletResponse; import java.util.Enumeration; /** - * Task receives the response of GenerateGuiQueryAustrianResidenceTask and handles it. + * Task receives the response of {@link GenerateAustrianResidenceGuiTask} and handles it. * * @author amarsalek */ @Slf4j -@Component("ReceiveGuiAustrianResidenceResponseTask") -public class ReceiveGuiAustrianResidenceResponseTask extends AbstractAuthServletTask { +@Component("ReceiveAustrianResidenceGuiResponseTask") +public class ReceiveAustrianResidenceGuiResponseTask extends AbstractAuthServletTask { final String formerResidenceAvailableParameterName = "formerResidenceAvailable"; final String streetParameterName = "street"; @@ -54,7 +54,7 @@ public class ReceiveGuiAustrianResidenceResponseTask extends AbstractAuthServlet final String cityParameterName = "city"; private final IZmrClient zmrClient; - public ReceiveGuiAustrianResidenceResponseTask(IZmrClient zmrClient) { + public ReceiveAustrianResidenceGuiResponseTask(IZmrClient zmrClient) { this.zmrClient = zmrClient; } @@ -63,7 +63,7 @@ public class ReceiveGuiAustrianResidenceResponseTask extends AbstractAuthServlet public void execute(ExecutionContext executionContext, HttpServletRequest request, HttpServletResponse response) throws TaskExecutionException { - log.trace("Starting ReceiveGuiAustrianResidenceResponseTask"); + log.trace("Starting ReceiveAustrianResidenceGuiResponseTask"); // set parameter execution context final Enumeration<String> reqParamNames = request.getParameterNames(); String street = null; diff --git a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/ReceiveLoginMethodGuiResponseTask.java b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/ReceiveOtherLoginMethodGuiResponseTask.java index 266198e5..d8b80689 100644 --- a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/ReceiveLoginMethodGuiResponseTask.java +++ b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/ReceiveOtherLoginMethodGuiResponseTask.java @@ -40,13 +40,13 @@ import javax.servlet.http.HttpServletResponse; import java.util.Enumeration; /** - * Task that searches ErnB and ZMR before adding person to SZR. + * Handles user's selection from {@link GenerateOtherLoginMethodGuiTask}. * - * @author amarsalek + * @author ckollmann */ @Slf4j -@Component("ReceiveGuiResponseTask") -public class ReceiveLoginMethodGuiResponseTask extends AbstractAuthServletTask { +@Component("ReceiveOtherLoginMethodGuiResponseTask") +public class ReceiveOtherLoginMethodGuiResponseTask extends AbstractAuthServletTask { @Override public void execute(ExecutionContext executionContext, HttpServletRequest request, HttpServletResponse response) diff --git a/eidas_modules/authmodule-eIDAS-v2/src/main/resources/eIDAS.Authentication.process.xml b/eidas_modules/authmodule-eIDAS-v2/src/main/resources/eIDAS.Authentication.process.xml index 6b67379c..f60bb5f9 100644 --- a/eidas_modules/authmodule-eIDAS-v2/src/main/resources/eIDAS.Authentication.process.xml +++ b/eidas_modules/authmodule-eIDAS-v2/src/main/resources/eIDAS.Authentication.process.xml @@ -15,23 +15,23 @@ <pd:Task id="createNewErnpEntryTask" class="CreateNewErnpEntryTask" /> - <pd:Task id="generateGuiTask" - class="GenerateGuiTask" /> + <pd:Task id="generateOtherLoginMethodGuiTask" + class="GenerateOtherLoginMethodGuiTask" /> <pd:Task id="generateMobilePhoneSignatureRequestTask" class="GenerateMobilePhoneSignatureRequestTask" /> - <pd:Task id="receiveGuiResponseTask" - class="ReceiveGuiResponseTask" /> + <pd:Task id="receiveOtherLoginMethodGuiResponseTask" + class="ReceiveOtherLoginMethodGuiResponseTask" /> <pd:Task id="receiveMobilePhoneSignatureResponseTask" class="ReceiveMobilePhoneSignatureResponseTask" /> - <pd:Task id="generateGuiQueryAustrianResidenceTask" - class="GenerateGuiQueryAustrianResidenceTask" /> - <pd:Task id="receiveGuiAustrianResidenceResponseTask" - class="ReceiveGuiAustrianResidenceResponseTask" /> + <pd:Task id="generateAustrianResidenceGuiTask" + class="GenerateAustrianResidenceGuiTask" /> + <pd:Task id="receiveAustrianResidenceGuiResponseTask" + class="ReceiveAustrianResidenceGuiResponseTask" /> <pd:StartEvent id="start" /> - - <pd:Transition from="start" + + <pd:Transition from="start" to="createAuthnRequest" /> <pd:Transition from="createAuthnRequest" to="receiveAuthnResponse" /> @@ -42,30 +42,36 @@ to="createNewErnpEntryTask" conditionExpression="ctx['TASK_CreateNewErnpEntryTask']"/> <pd:Transition from="initialRegisterSearch" - to="generateGuiTask" - conditionExpression="ctx['TASK_GenerateGuiTask']"/> + to="generateOtherLoginMethodGuiTask" + conditionExpression="ctx['TASK_GenerateOtherLoginMethodGuiTask']"/> - <pd:Transition from="generateGuiTask" - to="receiveGuiResponseTask" /> - <pd:Transition from="receiveGuiResponseTask" + <pd:Transition from="generateOtherLoginMethodGuiTask" + to="receiveOtherLoginMethodGuiResponseTask" /> + <pd:Transition from="receiveOtherLoginMethodGuiResponseTask" to="generateMobilePhoneSignatureRequestTask" conditionExpression="ctx['TASK_GenerateMobilePhoneSignatureRequestTask']"/> <pd:Transition from="generateMobilePhoneSignatureRequestTask" to="receiveMobilePhoneSignatureResponseTask" /> <pd:Transition from="receiveMobilePhoneSignatureResponseTask" to="createNewErnpEntryTask" /> - <pd:Transition from="receiveGuiResponseTask" - to="generateGuiQueryAustrianResidenceTask" - conditionExpression="ctx['Task_GenerateGuiQueryAustrianResidenceTask']"/> - <pd:Transition from="generateGuiQueryAustrianResidenceTask" - to="receiveGuiAustrianResidenceResponseTask" /> + <!-- TRANSITION_TO_GENERATE_EIDAS_LOGIN --> + <!-- <pd:Transition from="receiveOtherLoginMethodGuiResponseTask" --> + <!-- to="generateAustrianResidenceGuiTask" --> + <!-- conditionExpression="ctx['TASK_TODO']"/> --> + + <pd:Transition from="receiveOtherLoginMethodGuiResponseTask" + to="generateAustrianResidenceGuiTask" + conditionExpression="ctx['TASK_GenerateAustrianResidenceGuiTask']"/> - <pd:Transition from="receiveGuiAustrianResidenceResponseTask" + <pd:Transition from="generateAustrianResidenceGuiTask" + to="receiveAustrianResidenceGuiResponseTask" /> + + <pd:Transition from="receiveAustrianResidenceGuiResponseTask" to="generateIdentityLink" conditionExpression="ctx['TASK_TODO']"/> - <pd:Transition from="receiveGuiAustrianResidenceResponseTask" + <pd:Transition from="receiveAustrianResidenceGuiResponseTask" to="createNewErnpEntryTask" conditionExpression="ctx['TASK_TODO']"/> @@ -76,9 +82,9 @@ <pd:Transition from="generateIdentityLink" to="finalizeAuthentication" /> - <pd:Transition from="finalizeAuthentication" + <pd:Transition from="finalizeAuthentication" to="end" /> - + <pd:EndEvent id="end" /> </pd:ProcessDefinition> diff --git a/eidas_modules/authmodule-eIDAS-v2/src/main/resources/eidas_v2_auth.beans.xml b/eidas_modules/authmodule-eIDAS-v2/src/main/resources/eidas_v2_auth.beans.xml index a720c1f8..07553c22 100644 --- a/eidas_modules/authmodule-eIDAS-v2/src/main/resources/eidas_v2_auth.beans.xml +++ b/eidas_modules/authmodule-eIDAS-v2/src/main/resources/eidas_v2_auth.beans.xml @@ -22,7 +22,7 @@ <bean id="ZmrClientForeIDAS" class="at.asitplus.eidas.specific.modules.auth.eidas.v2.zmr.DummyZmrClient" /> - + <bean id="eIDASAuthModule" class="at.asitplus.eidas.specific.modules.auth.eidas.v2.EidasAuthenticationModulImpl"> <property name="priority" value="2" /> @@ -39,7 +39,7 @@ ref="specificConnectorAdditionalAttributesFileWithPath" /> </bean> - <!-- <bean id="eIDASDataStore" class="at.asitplus.eidas.specific.modules.auth.eidas.v2.service.eIDASDataStore" + <!-- <bean id="eIDASDataStore" class="at.asitplus.eidas.specific.modules.auth.eidas.v2.service.eIDASDataStore" /> --> <bean id="authBlockSigningService" @@ -106,28 +106,28 @@ class="at.asitplus.eidas.specific.modules.auth.eidas.v2.tasks.CreateNewErnpEntryTask" scope="prototype" /> - <bean id="GenerateGuiTask" - class="at.asitplus.eidas.specific.modules.auth.eidas.v2.tasks.GenerateLoginMethodGuiTask" + <bean id="GenerateOtherLoginMethodGuiTask" + class="at.asitplus.eidas.specific.modules.auth.eidas.v2.tasks.GenerateOtherLoginMethodGuiTask" scope="prototype" /> <bean id="GenerateMobilePhoneSignatureRequestTask" class="at.asitplus.eidas.specific.modules.auth.eidas.v2.tasks.GenerateMobilePhoneSignatureRequestTask" scope="prototype" /> - <bean id="ReceiveGuiResponseTask" - class="at.asitplus.eidas.specific.modules.auth.eidas.v2.tasks.ReceiveLoginMethodGuiResponseTask" + <bean id="ReceiveOtherLoginMethodGuiResponseTask" + class="at.asitplus.eidas.specific.modules.auth.eidas.v2.tasks.ReceiveOtherLoginMethodGuiResponseTask" scope="prototype" /> <bean id="ReceiveMobilePhoneSignatureResponseTask" class="at.asitplus.eidas.specific.modules.auth.eidas.v2.tasks.ReceiveMobilePhoneSignatureResponseAndSearchInRegistersTask" scope="prototype" /> - <bean id="GenerateGuiQueryAustrianResidenceTask" - class="at.asitplus.eidas.specific.modules.auth.eidas.v2.tasks.GenerateGuiQueryAustrianResidenceTask" + <bean id="GenerateAustrianResidenceGuiTask" + class="at.asitplus.eidas.specific.modules.auth.eidas.v2.tasks.GenerateAustrianResidenceGuiTask" scope="prototype" /> - <bean id="ReceiveGuiAustrianResidenceResponseTask" - class="at.asitplus.eidas.specific.modules.auth.eidas.v2.tasks.ReceiveGuiAustrianResidenceResponseTask" + <bean id="ReceiveAustrianResidenceGuiResponseTask" + class="at.asitplus.eidas.specific.modules.auth.eidas.v2.tasks.ReceiveAustrianResidenceGuiResponseTask" scope="prototype" /> |