diff options
Diffstat (limited to 'id/server/idserverlib/src')
2 files changed, 8 insertions, 13 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/AttributeProviderFactory.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/AttributeProviderFactory.java index cbe7e5f3c..c998b5f69 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/AttributeProviderFactory.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/AttributeProviderFactory.java @@ -37,7 +37,7 @@ public class AttributeProviderFactory { } else if (shortname.equals("EHvdAttributeProvider")) { return new EHvdAttributeProviderPlugin(url, attributes); } else if (shortname.equals("SignedDocAttributeRequestProvider")) { - return new SignedDocAttributeRequestProvider(url); + return new SignedDocAttributeRequestProvider(url, attributes); } else { return null; } diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/SignedDocAttributeRequestProvider.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/SignedDocAttributeRequestProvider.java index 59b4f386f..3993ee92f 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/SignedDocAttributeRequestProvider.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/SignedDocAttributeRequestProvider.java @@ -17,18 +17,10 @@ import at.gv.egovernment.moa.id.auth.data.AuthenticationSession; import at.gv.egovernment.moa.id.auth.exception.MOAIDException; import at.gv.egovernment.moa.id.auth.stork.VelocityProvider; import at.gv.egovernment.moa.id.config.auth.OAAuthParameter; -import at.gv.egovernment.moa.id.util.HTTPUtils; import at.gv.egovernment.moa.logging.Logger; -import at.gv.egovernment.moa.util.StringUtils; - import eu.stork.peps.auth.commons.IPersonalAttributeList; -import eu.stork.peps.auth.commons.PEPSUtil; import eu.stork.peps.auth.commons.PersonalAttribute; import eu.stork.peps.auth.commons.PersonalAttributeList; -import eu.stork.peps.auth.commons.STORKAttrQueryRequest; -import eu.stork.peps.auth.commons.STORKAttrQueryResponse; -import eu.stork.peps.auth.engine.STORKSAMLEngine; -import eu.stork.peps.exceptions.STORKSAMLEngineException; /** * Forwards a signedDoc attribute request to the oasis-dss service instance @@ -42,14 +34,19 @@ public class SignedDocAttributeRequestProvider implements AttributeProvider { */ private String oasisDssWebFormURL; + /** The attributes. */ + private String attributes; + /** * Instantiates a new signed doc attribute request provider. * * @param oasisDssWebFormURL * the AP location + * @param attributes */ - public SignedDocAttributeRequestProvider(String oasisDssWebFormURL) { + public SignedDocAttributeRequestProvider(String oasisDssWebFormURL, String attributes) { this.oasisDssWebFormURL = oasisDssWebFormURL; + this.attributes = attributes; } /* @@ -61,7 +58,7 @@ public class SignedDocAttributeRequestProvider implements AttributeProvider { */ public IPersonalAttributeList acquire(PersonalAttribute attribute, String spCountyCode, AuthenticationSession moasession) throws UnsupportedAttributeException, ExternalAttributeRequestRequiredException { - if(!attribute.getName().equals("signedDoc")){ + if(!attributes.contains(attribute.getName())) { throw new UnsupportedAttributeException(); } @@ -80,8 +77,6 @@ public class SignedDocAttributeRequestProvider implements AttributeProvider { public IPersonalAttributeList parse(HttpServletRequest httpReq) throws MOAIDException, UnsupportedAttributeException { Logger.debug("Beginning to extract OASIS-DSS response out of HTTP Request"); - - STORKSAMLEngine engine = STORKSAMLEngine.getInstance("VIDP"); try { String signResponse = new String(Base64.decodeBase64(httpReq.getParameter("signresponse")), "UTF8"); List<String> values = new ArrayList<String>(); |