From 1092129203ea1f5c17ae8a10ec43f7907140759c Mon Sep 17 00:00:00 2001 From: Florian Reimair Date: Tue, 12 Jan 2016 15:35:50 +0100 Subject: fixed bug of missing citizen country code for stork module --- .../id/auth/modules/stork/tasks/CreateStorkAuthRequestFormTask.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'id/server') diff --git a/id/server/modules/module-stork/src/main/java/at/gv/egovernment/moa/id/auth/modules/stork/tasks/CreateStorkAuthRequestFormTask.java b/id/server/modules/module-stork/src/main/java/at/gv/egovernment/moa/id/auth/modules/stork/tasks/CreateStorkAuthRequestFormTask.java index ef61739f8..e19947313 100644 --- a/id/server/modules/module-stork/src/main/java/at/gv/egovernment/moa/id/auth/modules/stork/tasks/CreateStorkAuthRequestFormTask.java +++ b/id/server/modules/module-stork/src/main/java/at/gv/egovernment/moa/id/auth/modules/stork/tasks/CreateStorkAuthRequestFormTask.java @@ -41,9 +41,10 @@ import eu.stork.peps.auth.commons.PersonalAttribute; import eu.stork.peps.auth.commons.PersonalAttributeList; import eu.stork.peps.auth.commons.STORKAuthnRequest; import eu.stork.peps.auth.engine.STORKSAMLEngine; +import eu.stork.peps.auth.engine.core.CitizenCountryCode; import eu.stork.peps.exceptions.STORKSAMLEngineException; - import at.gv.egovernment.moa.id.auth.BaseAuthenticationServer; +import at.gv.egovernment.moa.id.auth.MOAIDAuthConstants; import at.gv.egovernment.moa.id.auth.builder.CreateXMLSignatureRequestBuilder; import at.gv.egovernment.moa.id.auth.data.AuthenticationSession; import at.gv.egovernment.moa.id.auth.exception.AuthenticationException; @@ -126,6 +127,9 @@ public class CreateStorkAuthRequestFormTask extends AbstractAuthServletTask { AuthenticationSession moasession = BaseAuthenticationServer.getSession(sessionID); IRequest pendingReq = RequestStorage.getPendingRequest(pendingRequestID); + // bugfix: the new task system fails to initialize the CCC - set it here + moasession.setCcc((String) executionContext.get(MOAIDAuthConstants.PARAM_CCC)); + if (StringUtils.isEmpty(moasession.getCcc())) { // illegal state; task should not have been executed without a selected country throw new AuthenticationException("stork.22", new Object[] { sessionID }); -- cgit v1.2.3