aboutsummaryrefslogtreecommitdiff
path: root/eidas_modules/authmodule-eIDAS-v2/src/main/java
diff options
context:
space:
mode:
authorThomas Lenz <thomas.lenz@egiz.gv.at>2019-12-10 08:51:07 +0100
committerThomas Lenz <thomas.lenz@egiz.gv.at>2019-12-10 08:51:07 +0100
commita58825be80743c58779401ad75ee6f1936af192b (patch)
treef205769383c5b215c2b9bbfb40d038e99069e075 /eidas_modules/authmodule-eIDAS-v2/src/main/java
parente443168b481bb88fecbad73084147e7e8c882908 (diff)
downloadNational_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/java')
-rw-r--r--eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/EidasAuthenticationModulImpl.java7
1 files changed, 5 insertions, 2 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;