diff options
author | Thomas Lenz <thomas.lenz@egiz.gv.at> | 2019-12-10 08:51:07 +0100 |
---|---|---|
committer | Thomas Lenz <thomas.lenz@egiz.gv.at> | 2019-12-10 08:51:07 +0100 |
commit | a58825be80743c58779401ad75ee6f1936af192b (patch) | |
tree | f205769383c5b215c2b9bbfb40d038e99069e075 /eidas_modules/authmodule-eIDAS-v2/src/main | |
parent | e443168b481bb88fecbad73084147e7e8c882908 (diff) | |
download | National_eIDAS_Gateway-a58825be80743c58779401ad75ee6f1936af192b.tar.gz National_eIDAS_Gateway-a58825be80743c58779401ad75ee6f1936af192b.tar.bz2 National_eIDAS_Gateway-a58825be80743c58779401ad75ee6f1936af192b.zip |
add jUnit test
Diffstat (limited to 'eidas_modules/authmodule-eIDAS-v2/src/main')
2 files changed, 6 insertions, 3 deletions
diff --git a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/EidasAuthenticationModulImpl.java b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/EidasAuthenticationModulImpl.java index 41c74217..9a2d49f3 100644 --- a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/EidasAuthenticationModulImpl.java +++ b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/EidasAuthenticationModulImpl.java @@ -23,6 +23,8 @@ package at.asitplus.eidas.specific.modules.auth.eidas.v2; +import java.io.Serializable; + import org.apache.commons.lang3.StringUtils; import at.asitplus.eidas.specific.connector.MsEidasNodeConstants; @@ -62,8 +64,9 @@ public class EidasAuthenticationModulImpl implements AuthModule { */ @Override public String selectProcess(ExecutionContext context, IRequest pendingReq) { - if (StringUtils.isNotBlank((String) context.get(MsEidasNodeConstants.REQ_PARAM_SELECTED_COUNTRY)) - || StringUtils.isNotBlank((String) context.get(MsEidasNodeConstants.REQ_PARAM_SELECTED_COUNTRY))) { + Serializable flagObj = context.get(MsEidasNodeConstants.REQ_PARAM_SELECTED_COUNTRY); + if (flagObj != null && flagObj instanceof String + && StringUtils.isNotBlank((String) context.get(MsEidasNodeConstants.REQ_PARAM_SELECTED_COUNTRY))) { return "eIDASAuthentication_v2"; } else { return null; 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 708fd4e2..fbb48229 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 @@ -40,7 +40,7 @@ </bean> <bean id="eIDASAuthModule" - class="at.asitplus.eidas.specific.modules.auth.eidas.v2.eIDASAuthenticationModulImpl"> + class="at.asitplus.eidas.specific.modules.auth.eidas.v2.EidasAuthenticationModulImpl"> <property name="priority" value="2" /> </bean> |